join 2 columns in python code example
Example 1: python merge strings in columns
df["period"] = df["Year"].astype(str) + df["quarter"]
Example 2: concat pandas python
>>> s1 = pd.Series(['a', 'b'])
>>> s2 = pd.Series(['c', 'd'])
>>> pd.concat([s1, s2])
0 a
1 b
0 c
1 d
dtype: object
Example 3: how to merge two column pandas
DataFrame["new_column"] = DataFrame["column1"] + DataFrame["column2"]