User Tools

Site Tools


data:pandas_groupby

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

data:pandas_groupby [2018/03/12 16:28] – created aistisdata:pandas_groupby [2018/03/12 16:41] (current) – aistis
Line 9: Line 9:
 df3a = a.groupby('date').agg({'price': ['first','max', 'min', 'last'],'volume': ['sum']}) df3a = a.groupby('date').agg({'price': ['first','max', 'min', 'last'],'volume': ['sum']})
 </code> </code>
 +
 +to aggreage by date
 +<code python>
 +# create daily
 +df1 = a.groupby([a['date'].dt.date]).agg({'price': ['first','max', 'min', 'last'],'volume': ['sum']})
 +df1.head()
 +df1.plot()
 +</code>
 +
 +
data/pandas_groupby.1520864894.txt.gz · Last modified: by aistis