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
You are chained indexing, and operating on a copy (numpy is creating a copy here, for object type is often does this). See docs here
You should not use a chained inplace op, ever. It is pretty hard for pandas to detect this though.
Further, in general you should NOT be using object dtypes to represent numbers (which is what you get with None). NaN is the missing value marker.
In [20]: id(a.values.base)
Out[20]: 4430108432
# so this is a view
In [19]: id(a.loc[:,'f'].values.base)
Out[19]: 4430108432
# this is a copy
In [18]: id(a.loc[:,['f','s']].values.base)
Out[18]: 4431376592
This code:
It's not the biggest error, but still.
The text was updated successfully, but these errors were encountered: