-
-
Save karanjagota/1ecbd6190c7c2586afe9fb719bfe8178 to your computer and use it in GitHub Desktop.
gist for medium blogs
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 | |
# loading data | |
data_1 = {'gold':['day1','day2','day3','day4','day5'], | |
'2015':[10,20,30,40,50], | |
'2016':[15,25,35,45,55], | |
'2017':[17,27,37,47,57], | |
'2018':[19,29,39,49,59]} | |
data_2 = {'gold':['day1','day2','day3','day4','day5'], | |
'2019':[20,20,40,80,50], | |
'2020':[35,45,75,45,55], | |
'2021':[87,27,37,47,57], | |
'2022':[79,89,99,39,49]} | |
# Data Frames | |
df1 = pd.DataFrame(data_1) | |
df2 = pd.DataFrame(data_2) | |
# Merging DataFrames | |
merge_df = pd.merge(df1, df2, on='gold') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment