dataframe from two series

In [1]: s1 = pd.Series([1, 2], index=['A', 'B'], name='s1')

In [2]: s2 = pd.Series([3, 4], index=['A', 'B'], name='s2')

In [3]: pd.concat([s1, s2], axis=1)
Out[3]:
   s1  s2
A   1   3
B   2   4

In [4]: pd.concat([s1, s2], axis=1).reset_index()
Out[4]:
  index  s1  s2
0     A   1   3
1     B   2   4

Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
how to create a dataframe from two series how to make a series from 2 columns of a dataframe in python dataframe with two series make a df from two series pandas dataframe from 2 series pandas create dataframe with two series pandas and two series pandas dataframe from multiple series pd dataframe from two series make dataframe from series with 2 columns pandas dataframe from two series make dataframe from 2 series pandas make dataframe from 2 series create dataframe in pandas using two series two series into dataframe create dataframe from 2 series create new dataframe from 2 different series how to create dataframe with two series two pandas series to dataframe two series to dataframe how to make a dataframe from 2 pandas series convert two series to dataframe how to create dataframe from multiple series how to make a dataframe from two series how to make a dataframe from two series in ppandas making a dataframe of two series in ython pandas two series to dataframe merge multiple series into one serie dataframe to series create a dataframe out of 2 pd series add two serries columns python combine two series based on indez pandas multiple series to dataframe merge 2 series by index merge two pd series series with same index merge two series on index pandas create a dataframe from two series merge two series as two columns pandas bind two pandas series creating dataframe from two series in pandas merge series into dataframe pandas how to merge series into dataframe padas stack two series combining two series based on index combining two series dataframe is two series join 2 series into dataframe multiple series to dataframe pandas two series to a dataframe using pd.dataframe two series in a dataframe convert multiple series to a dataframe combine multiple series into dataframe combine list of series into dataframe pandas merge two series into dataframe how to sort valeus after merging two series into dataframe how convert two series into dataframe concat series into dataframe merge 3 series into dataframe merge three series into dataframe merge pandas series into dataframe generate hamming series by merging two series make dataframe from two series combine series into dataframe merge two series on index merge two pandas series to one dictionaries combine two series into dataframe convert multiple series to dataframe concatenate series into dataframe pandas df from two series put two series into dataframe dataframe from two series join a dataframe and series to form a new dataframe make a dataframe from two series merge multiple series into dataframe merge series into dataframe panads create a dataframe from two series pandas append two series to dataframe how combine two series into a single dataframe in pandas pandas combine tgwo series make a single df with two series pandas stack two pandas series pandas concat series into dataframe join two series pndas two series to dataframe pandas join two series by index pandas combine multiple series into a df pandas combine series into dataframe
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source