- API reference
- DataFrame
- pandas.DataF...
pandas.DataFrame.attrs#
- propertyDataFrame.attrs[source]#
Dictionary of global attributes of this dataset.
Warning
attrs is experimental and may change without warning.
See also
DataFrame.flagsGlobal flags applying to this object.
Notes
Many operations that create new datasets will copy
attrs. Copiesare always deep so that changingattrswill only affect thepresent dataset.pandas.concatcopiesattrsonly if all inputdatasets have the sameattrs.Examples
For Series:
>>>ser=pd.Series([1,2,3])>>>ser.attrs={"A":[10,20,30]}>>>ser.attrs{'A': [10, 20, 30]}
For DataFrame:
>>>df=pd.DataFrame({'A':[1,2],'B':[3,4]})>>>df.attrs={"A":[10,20,30]}>>>df.attrs{'A': [10, 20, 30]}
On this page