Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'str' object has no attribute 'shape' #68

Open
jackyyanggp opened this issue Dec 1, 2020 · 3 comments
Open

AttributeError: 'str' object has no attribute 'shape' #68

jackyyanggp opened this issue Dec 1, 2020 · 3 comments
Labels
bug Something isn't working can't repro issue

Comments

@jackyyanggp
Copy link

my_report = sv.analyze(df, pairwise_analysis = "off")

Tried to call this function but got this error when I input a normal dataframe that only contain numeric columns. Any advice what might went wrong?

@fbdesignpro
Copy link
Owner

Hi @jackyyanggp thank you for the report! I'm not sure what could be causing this. Are you able to run other data sets successfully? I'm guessing you couldn't share the data so I could debug it? Also if you have a call stack, that could be helpful, to see where the error is happening.
Thanks again!

@jackyyanggp
Copy link
Author

jackyyanggp commented Dec 2, 2020

Hi @fbdesignpro thanks for your response, unfortunately I can't share the data and haven't tried it with other dataset as this dataframe is already a sample/small dataframe. please see the detailed error below:

image

@fbdesignpro
Copy link
Owner

Hello again @jackyyanggp, sorry for the slight delay this week! I looked into it and as far as I can tell without looking at the source data, I'm wondering if it could be an issue with the pandas installation itself, because as you can see from the stack, sweetviz is calling series.sum() successfully (suggesting the numerical data is fine) but series.mad() fails right after.

I would love to know if this is something we can fix. If you have time, could you test if the following works?

df.mad()

This should print each column in some numbers without errors. If there are errors, and means the issue is outside of sweetviz. If there are no errors, it would be good to try the command on a specific column of data. e.g.:

df["PUT_A_COLUMN_NAME_HERE"].mad()

I would be very curious to see how these tests work out!

Thank you again,
Francois

@fbdesignpro fbdesignpro added the bug Something isn't working label Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working can't repro issue
Projects
None yet
Development

No branches or pull requests

2 participants