pd.DataFrame()
code:python
import pandas as pd
df = pd.DataFrame(data)
print(df) # 出力:
# A B
# 0 1 4
# 1 2 5
# 2 3 6
code:python
df = pd.DataFrame({s1.name: s1, s2.name: s2})
print(df) # 出力:
# A B
# 0 1 4
# 1 2 5
# 2 3 6
code:python
data = 1, 4], 2, 5, [3, 6 df = pd.DataFrame(data, columns='A', 'B') print(df) # 出力:
# A B
# 0 1 4
# 1 2 5
# 2 3 6