Pandas column count mismatch after insert into dataframe I am trying to insert a column of values from one dataframe to another. The total count of values of both the indiviual dataframes is 91744 but when I use 

df1.insert(loc=0, column='x1', value=ts) 

to insert the values of ts as the first column in df1, the value count after insertion turns out to be 84175 instead of actual 91744. Please tell me what is wrong with this.

&gt;&gt;&gt; df1.insert(loc=0, column='x1', value=ts)
&gt;&gt;&gt; df1.x1.count()
84175
&gt;&gt;&gt; ts.count()
0    91744
dtype: int64

&gt;&gt;&gt; df1.describe()
                 x1            x2
count  84175.000000  91744.000000
mean       0.249044     11.744387
std        0.191239     13.294185
min        0.000000      1.000000
25%        0.108383      3.000000
50%        0.212760     12.000000
75%        0.311860     15.000000
max        1.000000    551.000000


Sample data is given below.

&gt;&gt;&gt; df1.head()
   x2  x3  x4   x5                   x6  y
0  12   1  13  497  2017-11-07 09:30:38  0
1  25   1  17  259  2017-11-07 13:40:27  0
2  12   1  19  212  2017-11-07 18:05:24  0
3  13   1  13  477  2017-11-07 04:58:08  0
4  12   1   1  178  2017-11-09 09:00:09  0
&gt;&gt;&gt; ts.head()
         x1
0  0.218561
1  0.269357
2  0.257698
3  0.238417
4  0.164645


My objective was to add the x1 column from of ts dataframe as the first column of df1 data frame.
Can you share some of your data frame i would recommend using merge instead of insert if you have a common column let's say ID for example your code will look like this:

mergedStuff = pd.merge(df1, df2, on=['id'], how='outer')
mergedStuff.head()


as simple as that