Skip to content

Instantly share code, notes, and snippets.

@zaloogarcia
zaloogarcia / pandas_to_spark.py
Last active April 19, 2022 16:20
Script for converting Pandas DF to Spark's DF
from pyspark.sql.types import *
# Auxiliar functions
# Pandas Types -> Sparks Types
def equivalent_type(f):
if f == 'datetime64[ns]': return DateType()
elif f == 'int64': return LongType()
elif f == 'int32': return IntegerType()
elif f == 'float64': return FloatType()
else: return StringType()
@aflaxman
aflaxman / 2013_10_07_bootstrap_SIDS.ipynb
Created October 7, 2013 17:44
Bootstrap resampling with Python
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.