Skip to content

Instantly share code, notes, and snippets.

@Celia-code
Created Mar 11, 2020
Embed
What would you like to do?
This is for pandas
import pandas as pd
#觀察資料
data = pd.DataFrame({
"name":["Amy", "Bob", "Chole"],
"score":[100, 80, 69]
})
print("資料數量:", data.size)
print("資料型態(列, 欄):", data.shape)
print("資料索引:", data.index)
#打印出
"""
資料數量: 6
資料型態(列, 欄): (3, 2)
資料索引: RangeIndex(start=0, stop=3, step=1)
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment