Skip to content

Instantly share code, notes, and snippets.

@lettergram
Created January 30, 2018 18:25
Show Gist options
  • Save lettergram/d80b14d590575d5cfd7a1a7348c09a8e to your computer and use it in GitHub Desktop.
Save lettergram/d80b14d590575d5cfd7a1a7348c09a8e to your computer and use it in GitHub Desktop.
import pandas as pd
# Inner Join
combined_df = first_df.join(second_df, how='inner')
# Outer Join
combined_df = first_df.join(second_df, how='outer')
# Outer Join, Fill NaN
combined_df = first_df.join(second_df, how='outer').fillna(method='ffill').fillna(0.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment