Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K

pandas.Series.flags#

propertySeries.flags[source]#

Get the properties associated with this pandas object.

The available flags are

  • Flags.allows_duplicate_labels

See also

Flags

Flags that apply to pandas objects.

DataFrame.attrs

Global metadata applying to this dataset.

Notes

“Flags” differ from “metadata”. Flags reflect properties of thepandas object (the Series or DataFrame). Metadata refer to propertiesof the dataset, and should be stored inDataFrame.attrs.

Examples

>>>df=pd.DataFrame({"A":[1,2]})>>>df.flags<Flags(allows_duplicate_labels=True)>

Flags can be get or set using.

>>>df.flags.allows_duplicate_labelsTrue>>>df.flags.allows_duplicate_labels=False

Or by slicing with a key

>>>df.flags["allows_duplicate_labels"]False>>>df.flags["allows_duplicate_labels"]=True

[8]ページ先頭

©2009-2025 Movatter.jp