Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

df insert

df.insert(0, "col0", pd.Series([5, 6], index=[1, 2]))
>>> df
   col0  col1  col1  newcol  col2
0   NaN   100     1      99     3
1   5.0   100     2      99     4
Source by pandas.pydata.org #
 
PREVIOUS NEXT
Tagged: #df #insert
ADD COMMENT
Topic
Name
1+3 =