Skip to content

Instantly share code, notes, and snippets.

We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
16.0
11.0
5.0
9.0
11.0
3.0
11.0
6.0
2.0
4.0
@rpanai
rpanai / Log Scale buttons.ipynb
Created March 31, 2020 12:26
Log-linear scale buttons with plotly to html
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rpanai
rpanai / bench.py
Created February 5, 2020 13:44 — forked from jcrist/bench.py
Vaex String benchmarks, updated with dask fixes
import vaex
import numpy as np
import dask.dataframe as dd
import dask
import dask.distributed
import json
import os
import time
import argparse
import multiprocessing
@rpanai
rpanai / apply_tariff_vectorized.py
Last active July 24, 2018 23:53
Fast Flexible Easy Pandas
import pandas as pd
import numpy as np
# define diz
diz_prices = {0:12, 1:20, 2:28}
out = pd.DataFrame(index=np.arange(25))
out["price"] = np.digitize(out.index.values , bins=[7,17,24])
out["price"] = out["price"].map(diz_prices)
diz = out.to_dict()["price"]