Instantly share code, notes, and snippets.

What would you like to do?
Resamples dataframe example for
import pandas as pd
import scipy.stats as ss
from scipy import signal
# Outer Join, Fill NaN
combined_df = first_df.join(second_df, how='outer').fillna(method='ffill').fillna(0.0)
# Resample first_df and second_df to be the same size
combiend_df[col1] = ss.zscore(signal.resample(first_df[col1], len(comb_df)))
combined_df[col2] = ss.zscore(signal.resample(np.diff(second_df[col2]), len(comb_df)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment