Open
Description
Feature Type
-
Adding new functionality to pandas
-
Changing existing functionality in pandas
-
Removing existing functionality in pandas
Problem Description
It would be nice if, when doing column selection on a dataframe, the attrs of the individual series were preserved.
Specifically, this code:
import pandas as pd
df = pd.DataFrame({'a': [1, 2]})
df['a'].attrs['foo'] = 'bar'
print(df[['a']]['a'].attrs)
currently prints
{}
but I would like it to print
{'foo': 'bar'}
Feature Description
N/A
Alternative Solutions
N/A
Additional Context
No response