Skip to content

Instantly share code, notes, and snippets.

Created Mar 11, 2020
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]
score = data["score"]
print("成績平均值:", score.mean())
data["grade"] = ["C", "A", "B+"]
成績平均值: 83.0
name score grade
0 Amy 100 C
1 Bob 80 A
2 Chole 69 B+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment