
Problem –
You have two pandas series and you want to create a dataframe from it.
Solution –
To combine two series into a Dataframe in pandas, you can use the concat method.
import pandas as pd
s1 = pd.Series([1, 2, 3, 4, 5], name='s1')
s2 = pd.Series([6, 7, 8, 9, 10], name='s2')
df = pd.concat([s1, s2], axis=1)
df
