Rather than create 2 temporary dfs you can just pass these as params within a dict using the DataFrame constructor:
pd.DataFrame({'email':sf.index, 'list':sf.values})
There are lots of ways to construct a df, see the docs
Answer from EdChum on Stack OverflowEducative
educative.io › answers › how-to-convert-series-to-dataframe-in-pandas
How to convert series to DataFrame in pandas
In pandas, converting a series to a DataFrame is a straightforward process. pandas uses the to_frame() method to easily convert a series into a data frame.
Videos
05:28
Create a DataFrame from multiple Series and Arrays in Python - YouTube
03:43
Convert Series to pandas DataFrame in Python (2 Examples) | Create ...
02:52
Pandas Series To Frame | pd.Series.to_frame() - YouTube
26:02
pandas - Series and DataFrame - Creating, Reading and Writing - ...
05:38
14: Pandas DataFrames: Creating a DataFrame from Series - YouTube
08:56
Pandas How to Create DataFrame from Series - YouTube
Top answer 1 of 9
243
Rather than create 2 temporary dfs you can just pass these as params within a dict using the DataFrame constructor:
pd.DataFrame({'email':sf.index, 'list':sf.values})
There are lots of ways to construct a df, see the docs
2 of 9
121
to_frame():
Starting with the following Series, email_series:
email
[email protected] A
[email protected] B
[email protected] C
dtype: int64
email_series = pd.Series(["[email protected]", ...])
I use to_frame to convert the series to DataFrame:
df = email_series.to_frame().reset_index()
email 0
0 [email protected] A
1 [email protected] B
2 [email protected] C
3 [email protected] D
Now all you need is to rename the column name and name the index column:
df = df.rename(columns= {0: 'list'})
df.index.name = 'index'
Your DataFrame is ready for further analysis.
Update: I just came across this link where the answers are surprisingly similar to mine here.
GeeksforGeeks
geeksforgeeks.org › python › creating-a-dataframe-from-pandas-series
Creating a dataframe from Pandas series - GeeksforGeeks
July 11, 2025 - We have created two lists 'author' and article' which have been passed to pd.Series() functions to create two Series. After creating the Series, we created a dictionary and passed Series objects as values of the dictionary, and the keys of the ...
Statology
statology.org › home › how to convert pandas series to dataframe (with examples)
How to Convert Pandas Series to DataFrame (With Examples)
August 10, 2021 - #convert Series to DataFrame and specify column name to be 'values' my_df = my_series.to_frame(name='values') #view pandas DataFrame print(my_df) values 0 3 1 4 2 4 3 8 4 14 5 17 6 20 #view object type print(type(my_df)) <class 'pandas.core.frame.DataFrame'> ... import pandas as pd #define three Series name = pd.Series(['A', 'B', 'C', 'D', 'E']) points = pd.Series([34, 20, 21, 57, 68]) assists = pd.Series([8, 12, 14, 9, 11]) We can use the following syntax to convert each Series into a DataFrame and concatenate the three DataFrames into one final DataFrame:
w3resource
w3resource.com › python-exercises › pandas › python-pandas-data-frame-exercise-39.php
Pandas DataFrame: Combining two series into a DataFrame - w3resource
Data Series: 0 100 1 200 2 python 3 300.12 4 400 dtype: object 0 10 1 20 2 php 3 30.12 4 40 dtype: object New DataFrame combining two series: 0 1 0 100 10 1 200 20 2 python php 3 300.12 30.12 4 400 40
Pandas
pandas.pydata.org › docs › reference › api › pandas.Series.html
pandas.Series — pandas 3.0.3 documentation
Even when False for Index/Series, a shallow copy of the data is made. Set to False to avoid copying array input at your own risk (if you know the input data won’t be modified elsewhere). Set to True to force copying Series/Index input up front. See also · DataFrame ·
W3Schools
w3schools.com › python › pandas › pandas_series.asp
Pandas Series
import pandas as pd calories = {"day1": 420, "day2": 380, "day3": 390} myvar = pd.Series(calories, index = ["day1", "day2"]) print(myvar) Try it Yourself » · Data sets in Pandas are usually multi-dimensional tables, called DataFrames.