# -*-coding:utf-8 -*-
import pandas as pd
import matplotlib.pyplot as plt
students = pd.read_excel("C:/Users/asus/Downloads/pandas/016/Student_Score.xlsx",sheet_name='Students',index_col='ID')
scores = pd.read_excel("C:/Users/asus/Downloads/pandas/016/Student_Score.xlsx",sheet_name='Scores',index_col='ID')
# table = students.merge(scores, how='left',on='ID').fillna(0)
table = students.join(scores, how='left',on='ID').fillna(0)
table.Score = table.Score.astype(int)
print(table)
pandas-matplotlib联合多表
最新推荐文章于 2022-06-01 11:45:20 发布