Skip to content

Instantly share code, notes, and snippets.

@kozo2
Created March 11, 2016 11:03
Show Gist options
  • Select an option

  • Save kozo2/be47fdbac6151a9c4ad5 to your computer and use it in GitHub Desktop.

Select an option

Save kozo2/be47fdbac6151a9c4ad5 to your computer and use it in GitHub Desktop.
import pandas as pd
a=pd.read_table("foo.out", sep=" ", header=None)
>>> for i in ["%.2d" % i for i in range(1,25)]:
... print [i, a[3].str.contains(i+"/Feb").value_counts()[True]]
['01', 511]
['02', 1552]
['03', 283]
['04', 93]
['05', 207]
['06', 71]
['07', 169]
['08', 134]
['09', 3036]
['10', 1479]
['11', 2250]
['12', 2135]
['13', 1863]
['14', 194]
['15', 188]
['16', 408]
['17', 268]
['18', 172]
['19', 3461]
['20', 52]
['21', 69]
['22', 92]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment