This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The following must be executed in a jupyter notebook rather than a shell environment. | |
# Use numpy to work with arrays | |
import numpy as np | |
# Use scipy.stats to do plot some statistical data | |
import scipy.stats as stats | |
import holoviews as hv | |
# Holoviews builds on top of either the Matplotlib or Bokeh plotting library. Choose to use Bokeh | |
# in these plots as interactive plots work very well with Bokeh | |
hv.notebook_extension('bokeh') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import polars as pl | |
import dask.dataframe as dd | |
# You can get the data from here: | |
# s3://coiled-datasets/h2o/G1_1e8_1e2_0_0/csv/G1_1e8_1e2_0_0.csv | |
fl = "data/G1_1e8_1e2_0_0.csv" | |
# Pandas and Dask examples based on this blog post | |
# https://coiled.io/blog/speed-up-pandas-query-10x-with-dask/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import timedelta, datetime | |
import polars as pl | |
# Make a dataframe with a one hour time series at 10-min intervals for group "a" | |
df = ( | |
pl.DataFrame( | |
{'date':pl.date_range(start,stop,timedelta(minutes=10)) | |
}) | |
.with_column( |