用法:
property Series.flags
獲取與此 pandas 對象關聯的屬性。
可用的標誌是
注意:
“Flags” 與 “metadata” 不同。標誌反映了 pandas 對象(Series 或 DataFrame)的屬性。元數據是 index 據集的屬性,應存儲在
DataFrame.attrs
中。例子:
>>> df = pd.DataFrame({"A":[1, 2]}) >>> df.flags <Flags(allows_duplicate_labels=True)>
可以使用
.
獲取或設置標誌>>> df.flags.allows_duplicate_labels True >>> df.flags.allows_duplicate_labels = False
或者用鑰匙切片
>>> df.flags["allows_duplicate_labels"] False >>> df.flags["allows_duplicate_labels"] = True
相關用法
- Python pandas.Series.floordiv用法及代碼示例
- Python pandas.Series.filter用法及代碼示例
- Python pandas.Series.first用法及代碼示例
- Python pandas.Series.factorize用法及代碼示例
- Python pandas.Series.fillna用法及代碼示例
- Python pandas.Series.add_prefix用法及代碼示例
- Python pandas.Series.map用法及代碼示例
- Python pandas.Series.max用法及代碼示例
- Python pandas.Series.str.isdecimal用法及代碼示例
- Python pandas.Series.str.get用法及代碼示例
- Python pandas.Series.to_csv用法及代碼示例
- Python pandas.Series.dt.day_name用法及代碼示例
- Python pandas.Series.sample用法及代碼示例
- Python pandas.Series.head用法及代碼示例
- Python pandas.Series.eq用法及代碼示例
- Python pandas.Series.plot.line用法及代碼示例
- Python pandas.Series.to_pickle用法及代碼示例
- Python pandas.Series.between_time用法及代碼示例
- Python pandas.Series.reindex_like用法及代碼示例
- Python pandas.Series.dt.is_year_end用法及代碼示例
注:本文由純淨天空篩選整理自pandas.pydata.org大神的英文原創作品 pandas.Series.flags。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。