Pandasの基礎 DataFrameの生成
DataFrameとはPandasで扱う種類のデータ構造。
引数にSeriesを渡すと生成できる。
pd.DataFrame([Series1, Series2, .....])
また、バリューにリスト方を持った辞書型を用いても生成可能。
注意点としては、リスト型の長さは同じでないといけない。
data = {"fruits": ["apple", "orange", "banana"],
"year": [2018, 2019, 2020],
"season": [11, 2, all]}
df = pd.DataFrame(data)
display(df)
出力結果
Author And Source
この問題について(Pandasの基礎 DataFrameの生成), 我々は、より多くの情報をここで見つけました https://qiita.com/takuya-aoyama917/items/6dfc8338673f9b57574d著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .