在原有的dataframe中直接使用dataframe[‘new line’]会警告:
A value is trying to be set on a copy of a slice from aDataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
现在使用:
dataframe.insert(dataframe.shape[1], 'new_line', 2222)
在原有的dataframe中直接使用dataframe[‘new line’]会警告:
A value is trying to be set on a copy of a slice from aDataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
现在使用:
dataframe.insert(dataframe.shape[1], 'new_line', 2222)