scikit-spectra
scikit-spectra copied to clipboard
Return series only occurs with attribute access
df.x may return a series, but df['x'] will always return a dataframe so maybe I can put this into some code where a series is returned.
There are actually several areas when attribute access is bad. For example, if I have column and do df.x = 50, it won't set the columns to a constant of 50. I probably don't do this, but take home is don't use attribute access for data access/setting.
Also index are built to be immutable, since they can be shared by different dfs. Can't do index[0]=1.0 for example.