import pandas as p
import matplotlib.pyplot as g
df_load = p.read_csv('BTC-USD.csv')
df_load
Dateobject
2014-09-170%
2014-09-180%
2708 others99.9%
Openfloat64
176.897003 - 67549.734375
0
2014-09-17
465.864014
1
2014-09-18
456.859985
2
2014-09-19
424.102997
3
2014-09-20
394.673004
4
2014-09-21
408.084991
5
2014-09-22
399.100006
6
2014-09-23
402.09201
7
2014-09-24
435.751007
8
2014-09-25
423.156006
9
2014-09-26
411.428986
df = df_load.sort_values('Close' ,ascending=False)
stores = 5
g.bar(df['Date'].head(stores), df['Close'].head(stores))
g.grid()
g.title('Mayores precios del Bitcoin')
g.ylabel('Precios')
g.xlabel('Fechas')
g.xticks(rotation=25)
g.show()
g.bar(df['Date'].tail(stores), df['Close'].tail(stores), color='#FF3333')
g.grid()
g.title('Menores precios del Bitcoin')
g.ylabel('Precios')
g.xlabel('Fechas')
g.xticks(rotation=25)
g.show()
g.hist(df['Volume'])
g.grid()
g.title('Numbres of bitcoins in trading')
g.xlabel('Number of Bitcoins')
g.ylabel('Días')
g.show()
df.tail(1)
Dateobject
Openfloat64
119
2015-01-14
223.893997
df = df_load.sort_values('Open', ascending=False)
df.head(1)
Dateobject
Openfloat64
2610
2021-11-09
67549.73438
df = df_load.sort_values('High', ascending=False)
df.head()
Dateobject
Openfloat64
2611
2021-11-10
66953.33594
2610
2021-11-09
67549.73438
2609
2021-11-08
63344.06641
2590
2021-10-20
64284.58594
2591
2021-10-21
66002.23438
g.hist(df['Open'])
g.grid()
g.title('Bitcoin open prices')
g.xlabel('Bitcoin prices')
g.ylabel('Days')
g.show()
g.hist(df['Close'])
g.grid()
g.title('Bitcoin Close Price')
g.xlabel('Bitcoin Price')
g.ylabel('Days')
g.show()
g.hist(df['High'])
g.grid()
g.title('Most Common Maximum daily price of Bitcoin')
g.xlabel('Bitcoin maximun price')
g.ylabel('Days')
g.show()