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
import pandas as pd a = pd.DataFrame([[False, True], [False, False]]) print(a.dtypes) b = a * 1 print(b.dtypes)
With 0.20.3, I get b as DataFrame int32. With 0.23.3, I get b as DataFrame object.
b
int32
object
a.dtypes = 0 bool 1 bool dtype: object
a.dtypes =
b.dtypes = 0 int32 1 int32 dtype: object
b.dtypes =
b.dtypes = 0 object 1 object dtype: object
pandas 0.20.3 vs pandas 0.23.3
The text was updated successfully, but these errors were encountered:
What do you get if you multiply a series instead of a dataframe?
Sorry, something went wrong.
Don't understand your question EDIT: I amended my example adding .dtypes. maybe it is clearer for you now
.dtypes
A Series works infers the dtype correctly:
In [71]: a[0] Out[71]: 0 False 1 False Name: 0, dtype: bool In [72]: a[0] * 1 Out[72]: 0 0 1 0 Name: 0, dtype: int64
Any idea about the root cause ? If you give me some tips, I can have a look
No idea what changed it, but it'll be fixed by the follow-up after #22074.
Successfully merging a pull request may close this issue.
Code Sample, a copy-pastable example if possible
Problem description
With 0.20.3, I get
b
as DataFrameint32
.With 0.23.3, I get
b
as DataFrameobject
.Expected Output
With 0.20.3
a.dtypes =
0 bool
1 bool
dtype: object
b.dtypes =
0 int32
1 int32
dtype: object
With 0.23.3
a.dtypes =
0 bool
1 bool
dtype: object
b.dtypes =
0 object
1 object
dtype: object
Versions
pandas 0.20.3 vs pandas 0.23.3
The text was updated successfully, but these errors were encountered: