虽然在熊猫中绘制groupby对象是直截了当且容易的,但我想知道从groupby对象中获取唯一组的最pythonic(pandastic?)方法是什么.例如:我正在处理大气数据,并尝试绘制几天或更长时间内的昼夜趋势.以下是包含许多天数据的DataFrame,其中时间戳是索引:
<class 'pandas.core.frame.DataFrame'>
DatetimeIndex: 10909 entries, 2013-08-04 12:01:00 to 2013-08-13 17:43:00
Data columns (total 17 columns):
Date 10909 non-null values
Flags 10909 non-null values
Time 10909 non-null values
convt 10909 non-null values
hino 10909 non-null values
hinox 10909 non-null values
intt 10909 non-null values
no 10909 non-null values
nox 10909 non-null values
ozonf 10909 non-null values
pmtt 10909 non-null values
pmtv 10909 non-null values
pres 10909 non-null values
rctt 10909 non-null values
smplf 10909 non-null values
stamp 10909 non-null values …
Run Code Online (Sandbox Code Playgroud)