python - What is the name parameter in Pandas Series? -
in doc of series, use parameter of name , fastpath not explained. do?
the name argument allows give name series object, i.e. column. when you'll put in dataframe, column named according name parameter.
example:
in [1]: s = pd.series(["a","b","c"], name="foo") in [2]: s out[2]: 0 1 b 2 c name: foo, dtype: object in [3]: pd.dataframe(s) out[4]: foo 0 1 b 2 c if don't give name series named automatically. here 0 in dataframe object:
0 0 1 b 2 c for fastpath, it's internal parameter , issue has been reported :
Comments
Post a Comment