如何使用groupby函数从表中查找特定值?

2024-04-19 15:38:15 发布

您现在位置:Python中文网/ 问答频道 /正文

import pandas as pd
df = pd.read_csv(r'C:\Users\USER\Desktop\dataset\covid.csv')
df.head(50)

我想使用groupby函数查找日期为'2021-02-09'的所有国家的总案例值。这是表格:

enter image description here