SHARE
TWEET

Untitled

a guest Feb 22nd, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def compute_final_dataframe(df: dd.DataFrame) -> pd.DataFrame:
  2.     """Execute dask task graph and compute final results"""
  3.     return (
  4.         df
  5.         .compute()
  6.         .reset_index()
  7.         .pivot(
  8.              index='drive_time',
  9.              columns='trip_distance',
  10.              values='avg_amount'
  11.         )
  12.         .fillna(0)
  13.     )
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top