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
Pandas version 0.17.1:
In [1]: import pandas as pd ...: data = pd.DataFrame({'d':[1,2,3],'e':[1.5,2,3],'f':[2,2,3]},index=list('abc')) ...: data.diff(axis=1) Out[1]: d e f a NaN NaN 1 b NaN NaN 0 c NaN NaN 0
Hint: the following gives expected result
In [2]: data.astype(float).diff(axis=1) Out[2]: d e f a NaN 0.5 0.5 b NaN 0.0 0.0 c NaN 0.0 0.0
The text was updated successfully, but these errors were encountered:
This seems similar to #10930
This comment suggests that the fix there won't work for mixed dtypes (but you only have ints)
Sorry, something went wrong.
this is a dupe of #10539
No branches or pull requests
Pandas version 0.17.1:
Hint: the following gives expected result
The text was updated successfully, but these errors were encountered: