3 ms·
That CSV is actually really interesting. The median wallet holds about $30, the largest holds $10b, and the standard deviation is over $2m. >>> import pand
by bspammer 5y ago
That CSV is actually really interesting. The median wallet holds about $30, the largest holds $10b, and the standard deviation is over $2m.
>>> import pandas as pd
df = pd.read_csv("btc_balance_sorted.csv")
df['balance'].apply(lambda x: x * 36902.7 / 100e6).describe()
count 3.359206e+07
mean 1.838824e+04
std 2.819739e+06
min 3.690270e-04
25% 2.871768e+00
50% 2.943913e+01
75% 2.652168e+02
max 1.063263e+10
- tomputer 5y ago> That CSV is actually really interesting. The median wallet holds about $30, the largest holds $10b, and the standard deviation is over $2m. Top 100 Richest Bitcoin Addresses: https://bitinfocharts.com/top-100-richest-bitcoin-addresses.html https://bitinfocharts.com/top-100-richest-bitcoin-addresses....
- rogue7 5y agoI agree with your comment, just FYI you could avoid apply on a pandas Series since it loops over every row in Python space. It's much faster to use vectorized operations directly e.g.: df["balance"].mul(36902.7).div(100e6) See [0] for explanations [0] https://stackoverflow.com/a/52674448 https://stackoverflow.com/a/52674448
- bspammer 5y agoThanks for the tip! You weren't kidding... %time df['balance'].apply(lambda x: x * 36902.7 / 100e6).describe() Wall time: 12.6 s %time df["balance"].mul(36902.7).div(100e6).describe() Wall time: 2.33 s