- 用法:- property Series.at
- 訪問行/列標簽對的單個值。 - 與 - loc類似,兩者都提供基於標簽的查找。如果您隻需要在 DataFrame 或 Series 中獲取或設置單個值,請使用- at。- KeyError
- 如果 DataFrame 中不存在‘label’。 
 
 - 拋出:- 例子:- >>> df = pd.DataFrame([[0, 2, 3], [0, 4, 1], [10, 20, 30]], ... index=[4, 5, 6], columns=['A', 'B', 'C']) >>> df A B C 4 0 2 3 5 0 4 1 6 10 20 30- 獲取指定行/列對的值 - >>> df.at[4, 'B'] 2- 在指定的行/列對處設置值 - >>> df.at[4, 'B'] = 10 >>> df.at[4, 'B'] 10- 在係列中獲取值 - >>> df.loc[5].at['B'] 4
相關用法
- Python pandas.Series.at_time用法及代碼示例
- Python pandas.Series.add_prefix用法及代碼示例
- Python pandas.Series.apply用法及代碼示例
- Python pandas.Series.append用法及代碼示例
- Python pandas.Series.array用法及代碼示例
- Python pandas.Series.argmin用法及代碼示例
- Python pandas.Series.abs用法及代碼示例
- Python pandas.Series.asfreq用法及代碼示例
- Python pandas.Series.asof用法及代碼示例
- Python pandas.Series.agg用法及代碼示例
- Python pandas.Series.all用法及代碼示例
- Python pandas.Series.add用法及代碼示例
- Python pandas.Series.add_suffix用法及代碼示例
- Python pandas.Series.argmax用法及代碼示例
- Python pandas.Series.align用法及代碼示例
- Python pandas.Series.aggregate用法及代碼示例
- Python pandas.Series.any用法及代碼示例
- Python pandas.Series.astype用法及代碼示例
- Python pandas.Series.autocorr用法及代碼示例
- Python pandas.Series.map用法及代碼示例
注:本文由純淨天空篩選整理自pandas.pydata.org大神的英文原創作品 pandas.Series.at。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。
