I am writing scripts in panda but i could not able to extract correct output that i want. here it is problem:
i can read this data from CSV file. Here you can find tabl
For resample, you can define two aggregation functions like this:
resample
def countU(x): return sum(i[0] == 'u' for i in x) def countNotU(x): return sum(i[0] != 'u' for i in x) print df.resample('M', how=[countU, countNotU])
Alternatively, consider groupby.
groupby