We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Using groupby(level=0).first() or groupby(level=0).last() to eliminate duplicate index entries modifies integer data types to float.
groupby(level=0).first()
groupby(level=0).last()
import pandas as pd idx = range(10) idx.append(9) df = pd.Series(data=range(11), index=idx, name='IntCol') print df print df.dtype 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 9 10 Name: IntCol int64 df2 = df.groupby(level=0).first() print df2 print df2.dtype 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 float64
The text was updated successfully, but these errors were encountered:
fixed in #3152 @courosh thanks for the report
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Using
groupby(level=0).first()
orgroupby(level=0).last()
to eliminate duplicate index entries modifies integer data types to float.The text was updated successfully, but these errors were encountered: