I like to add attributes to pandas DataFrame columns, for example to manage labels or units.
df = pd.DataFrame([[1, 2], [5, 6]], columns=['A', 'B'])
df['A'].units = 'm/s'
Calling the units of column (with df['A'].units) returns m/s.
However, the attribute gets lost after any DataFrame to Series operation, such as adding a new column:
df['C'] = [3, 8]
df['A'].units
AttributeError: 'Series' object has no attribute 'units'
Is there an approach to keep the attributes or an alternative to add columns?