I'm new to Pandas, and constantly getting the infamous SettingWithCopyWarning. If I have code like the following I get the warning:
import pandas as pd
import numpy as np
t1 = pd.DataFrame({'A':np.random.randn(8), 'B': np.random.randint(0,4,8)})
table = t1[t1['B'] < 3]
print(table)
table.sort(['B'], inplace=True)
print(table)
In this case, is it just warning me that the original data frame (i.e., 't1') will not be sorted when I run the sort?
Is there a more accepted way to perform this sort of operation (getting a slice of a data frame, and then applying functions on that slice)?