There are 2 dataframes
df1 and df2
df1 =
A B
111 222
222 5555
df2 =
C counter_2
333 100
777 25
I need to add a column "counter" to df1, it should just be like index, return the position of column's elements.
Like this:
df1['counter'] = range(len(df1))
A B counter
111 222 1
222 555 2
But I need to change the starting point, it should be the max number from df2 "counter" column.
df2['counter_2'].max() # 100
So my desired output is like:
A B counter
111 222 101
222 555 102
I've googled, but I can't find a solution.