IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices
See original GitHub issueDescribe 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
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.9pandas-profiling
3.1.0 pyhd8ed1ab_ 0 conda-forgepandas
1.4.2 py39h1832856_1 conda-forge
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:12
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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
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