You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove DataFrame._columns and use DataFrame.keys() and DataFrame.columns.values as a replacement. This will eliminate redundant storage that needs to be managed and could become out of date.
The text was updated successfully, but these errors were encountered:
Having researched this, the only reason to keep the ._columns attribute is to preserve the order. The downside is that it could cause inconsistencies if accessed outside the __setitem__ method. To remove this attribute and also preserve the column order we could make DataFrame an OrderedDict rather than a UserDict. However, since the two classes have different APIs it would be a larger refactor. A short term solution would be to enforce that ._columns not be modified outside of the __setitem__ method.
Remove
DataFrame._columns
and useDataFrame.keys()
andDataFrame.columns.values
as a replacement. This will eliminate redundant storage that needs to be managed and could become out of date.The text was updated successfully, but these errors were encountered: