1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
| path = '/Users/i306454/Downloads/dump.json' dump = pandas.read_json(path)
dump.info()
dump.describe()
dump.head(3)
dump.loc[1:2, 'size':]
dump['size']
dump.shape
dump[dump['size'] > 2000000]
dump['size'].hist(bins=20)
import matplotlib.pyplot as plt
x = [2500*sub for sub in range(0, 22)] plt.figure(figsize=(20, 8), dpi=80) plt.hist(main['size'].values, bins=range(0, 50000+1, 2500)) plt.grid() plt.xticks(x, ['{:.1f}KB'.format(sub/1000) for sub in x]) plt.show()
titles = dump['subject'] titletxt = ' '.join(titles) wordcloud = WordCloud(scale=10).generate(titletxt) plt.figure(figsize=(20, 8), dpi=80) plt.imshow(wordcloud, interpolation='bilinear') plt.axis("off") plt.show()
|