question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

See original GitHub issue

Describe the bug

running the example below gives this error IndexError: only integers, slices (:), ellipsis (), numpy.newaxis (None) and integer or boolean arrays are valid indices

latest version on conda-forge

To Reproduce

wine.csv

import numpy as np
import pandas as pd
from pandas_profiling import ProfileReport

df = pd.read_csv("wine.csv")

profile = ProfileReport(df, title="Pandas Profiling Report")

profile.to_file("tmp.html")

Version information:

  • Python 3.9
  • pandas-profiling 3.1.0 pyhd8ed1ab_ 0 conda-forge
  • pandas 1.4.2 py39h1832856_1 conda-forge

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:12

github_iconTop GitHub Comments

12reactions
Stephano120commented, Apr 20, 2022

Try running the profile = ProfileReport(yourDf, title=“Pandas Profiling Report”, vars={“num”: {“low_categorical_threshold”: 0}})

Doc: https://pandas-profiling.ydata.ai/docs/master/rtd/pages/advanced_usage.html#general-settings

1reaction
luckrolscommented, May 5, 2022

Hi Sbrugman,

Thank you very much. I can confirm that it now works perfectly with v3.2.0!

No need to add the vars={"num": {"low_categorical_threshold": 0}} anymore as a workaround.

Very happy! Thank you!

Kind regards,

Luc

Read more comments on GitHub >

github_iconTop Results From Across the Web

only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None ...
newaxis ( None ) and integer or boolean arrays are valid indices. My code is: def shuffle_bit_reversed_order(data: np.ndarray) -> np.ndarray: ...
Read more >
ellipsis (`...`), numpy.newaxis (`None`) and integer - YouTube
IndexError : only integers, slices (`:`), ellipsis (`...`), numpy. newaxis (` None `) and integer or boolean arrays are valid indices solved in ......
Read more >
Only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None ...
The Python "IndexError: only integers, slices ( : ), ellipsis ( ... ), numpy.newaxis ( None ) and integer or boolean arrays are...
Read more >
'only integers, slices (`:`), ellipsis (`…`), numpy.newaxis (`None ...
I'm trying to predict heart disease of patients using liner regression algorithm in machine ... and integer or boolean arrays are valid indices....
Read more >
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy ...
newaxis ( None ) and integer or boolean arrays are valid indices error. Corrected Code. import pandas as pd df = pd.DataFrame() df['one']...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found