Skip to content

Instantly share code, notes, and snippets.

@Celia-code
Created March 11, 2020 09:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Celia-code/118a548d68dd0dc64fe7c844eda4fcc9 to your computer and use it in GitHub Desktop.
Save Celia-code/118a548d68dd0dc64fe7c844eda4fcc9 to your computer and use it in GitHub Desktop.
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