You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem 1. The result is as expected (except for 2.0 instead of 2, see Problem 2).
a b
0 1 2.0
0 3 NaN
However, Python gives a warning
/usr/lib/python3.7/site-packages/pandas/core/indexing.py:1472: FutureWarning:
Passing list-likes to .loc or [] with any missing label will raise
KeyError in the future, you can use .reindex() as an alternative.
The warning suggests that this will be an exception in the future. The code seems legitimate, and as such produces the expected result.
Problem 2. Another problem can be illustrated by this output:
Problem 2. Thanks a lot for the link, very useful information (and not just regarding the mentioned problem). Actually, never noticed the problem before, until needed to write to a database recently and this changed the type of a column in the database after adding some missing values. So, this is not an issue anymore as this is by design.
Problem 1. I am not sure I can do this now. If you assign it to me, I'll remember to look into it later. This is if you have no immediate plans to look into this yourself or assign someone else.
Code Sample, a copy-pastable example if possible
Problem description
Problem 1. The result is as expected (except for
2.0
instead of2
, see Problem 2).However, Python gives a warning
The warning suggests that this will be an exception in the future. The code seems legitimate, and as such produces the expected result.
Problem 2. Another problem can be illustrated by this output:
Why the type of
b
is changed to Float64?Expected Output
Output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: