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

string column metrics bug #338

Closed
reza1615 opened this issue Dec 11, 2020 · 6 comments
Closed

string column metrics bug #338

reza1615 opened this issue Dec 11, 2020 · 6 comments

Comments

@reza1615
Copy link

reza1615 commented Dec 11, 2020

I am sorry there was a bug in my codes for string column description and it adds NaN to the results. so to solve it before computing any number please remove the NaN data from the calculations. this command

import numpy as np
df['a'] = df['a'].replace(np.nan, '', regex=True)

see http://alphatechadmin.pythonanywhere.com/dtale/popup/describe/1?selectedCol=City most of the numbers have 74 (NaN or missing number)

@reza1615 reza1615 changed the title string column metrics string column metrics bug + add NaN metric Dec 11, 2020
@reza1615 reza1615 changed the title string column metrics bug + add NaN metric string column metrics bug Dec 11, 2020
@aschonfeld
Copy link
Collaborator

@reza1615 I see 74 for the Missing: value but that seems correct. I can validate that when applying the custom filter City != City. Are you saying that these 74 nans should be updated to '' before we start building your column metrics? That seems a little off since these records are nan and not actually an empty string, but if thats how you think it should be treated thats fine with me.

@reza1615
Copy link
Author

please check
start with space
end with space
have punctuation
theses cases the number 74 should be 0

@reza1615
Copy link
Author

Screenshot_20201212-130651_Samsung Internet

@aschonfeld
Copy link
Collaborator

aschonfeld commented Dec 12, 2020

Ahh, got it. Thank you. Only thing to make note of is that this update will make Min # Chars update to zero. Is this expected?

@reza1615
Copy link
Author

yes it is right. we can remove 0 from the min result and get next min

@aschonfeld
Copy link
Collaborator

fixed in v1.28.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants