scikit-spectra icon indicating copy to clipboard operation
scikit-spectra copied to clipboard

Return series only occurs with attribute access

Open hughesadam87 opened this issue 11 years ago • 1 comments

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.

hughesadam87 avatar Jun 25 '13 18:06 hughesadam87

Also index are built to be immutable, since they can be shared by different dfs. Can't do index[0]=1.0 for example.

hughesadam87 avatar Jun 25 '13 18:06 hughesadam87