最佳答案
试图在 netc df 中创建一个新列,但我收到了警告
netc["DeltaAMPP"] = netc.LOAD_AM - netc.VPP12_AM
C:\Anaconda\lib\site-packages\ipykernel\__main__.py:1: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
什么是正确的方法来创建一个字段在新版本的熊猫,以避免得到警告?
pd.__version__
Out[45]:
u'0.19.2+0.g825876c.dirty'