Linked Questions

350 votes
7 answers
680k views

I have the following dataframes: > df1 id begin conditional confidence discoveryTechnique 0 278 56 false 0.0 1 1 421 18 false 0.0 ...
brucezepplin's user avatar
  • 9,852
109 votes
4 answers
258k views

I have to merge two dataframes: df1 company,standard tata,A1 cts,A2 dell,A3 df2 company,return tata,71 dell,78 cts,27 hcl,23 I have to unify both dataframes to one dataframe. I need output like: ...
Sai Rajesh's user avatar
  • 1,992
102 votes
3 answers
182k views

I have two dataframes and each one has two index columns. I would like to merge them. For example, the first dataframe is the following: V1 A 1/1/2012 12 2/1/2012 ...
km1234's user avatar
  • 2,319
70 votes
1 answer
104k views

I have a list of 18 data frames: dfList = [df1, df2, df3, df4, df5, df6.....df18] All of the data frames have a common id column so it's easy to join them each together with pd.merge 2 at a time. Is ...
Josh's user avatar
  • 1,309
55 votes
2 answers
98k views

i have a dataframe id store address 1 100 xyz 2 200 qwe 3 300 asd 4 400 zxc 5 500 bnm i have another dataframe df2 serialNo store_code ...
Shubham R's user avatar
  • 7,676
28 votes
4 answers
47k views

I have Three dataframes. All of them have a common column and I need to merge them based on the common column without missing any data Input >>>df1 0 Col1 Col2 Col3 1 data1 3 4 2 data2 4 ...
FunnyCoder's user avatar
28 votes
2 answers
67k views

I have two different data frames that I want to perform some sql operations on. Unfortunately, as is the case with the data I'm working with, the spelling is often different. See the below as an ...
runningbirds's user avatar
  • 6,675
20 votes
1 answer
73k views

I have two different DataFrames that I want to merge with date and hours columns. I saw some threads that are there, but I could not find the solution for my issue. I also read this document and tried ...
i.n.n.m's user avatar
  • 3,046
21 votes
2 answers
23k views

How can I merge two pandas DataFrames on two columns with different names and keep one of the columns? df1 = pd.DataFrame({'UserName': [1,2,3], 'Col1':['a','b','c']}) df2 = pd.DataFrame({'UserID': [1,...
E.K.'s user avatar
  • 4,379
21 votes
3 answers
99k views

I have two dataframes, df1 = pd.DataFrame({'A': ['A1', 'A1', 'A2', 'A3'], 'B': ['121', '345', '123', '146'], 'C': ['K0', 'K1', 'K0', 'K1']}) df2 = pd....
ARJ's user avatar
  • 2,120
5 votes
2 answers
23k views

I have two dataframes, I wanted to merge them into one single dataframe based on the matching row. My dataframe looks like this DF_1 Set_1 Fax_1 Fax_2 Abc_1 45 76 Abc_2 46 77 Abc_3 47 ...
ARJ's user avatar
  • 2,120
10 votes
2 answers
30k views

I am trying to join to data frames. They look like this DF1 = ID COUNTRY YEAR V1 V2 V3 V4 12 USA 2012 x y z a 13 USA ...
bjurstrs's user avatar
  • 1,129
4 votes
1 answer
30k views

I have 2 following data frames in pandas: movies +---+------------------------------+--------------+-----------+ | | movie title | genre | tconst | +---+-----------------...
Pinky the mouse's user avatar
5 votes
3 answers
19k views

In [88]: c Out[88]: Address Name CustomerID 10 Address for Mike Mike 11 Address for Marcia Marcia In [89]: c.index Out[...
DmitrySemenov's user avatar
7 votes
1 answer
50k views

I created a loop to read sqlite database into a pandas dataframe, and I am trying to merge them together based on "Code" ... df = pandas.Dataframe() # Creating an empty dataframe for merging at the ...
jake wong's user avatar
  • 5,248

15 30 50 per page
1
2 3 4 5
79