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 Overflow
Discussions

python - How to convert single-row pandas data frame to series? - Stack Overflow
I'm somewhat new to pandas. I have a pandas data frame that is 1 row by 23 columns. I want to convert this into a series. I'm wondering what the most pythonic way to do this is? I've tried pd.Series( More on stackoverflow.com
🌐 stackoverflow.com
Why does Pandas convert my DataFrame into a DataFrame and a Series inside a for loop?
Ok so now on further investigating, I found out that there is an extraneous pandas series containing the labels of the data frame, attached to the bottom of my dataframe which is being iterated over, hence giving two datatypes and the subsequent errors. Any clue how to work around this? More on reddit.com
🌐 r/learnpython
7
9
January 9, 2023
[Pandas Series] Using series as a column; how is this logical?
The result of a boolean operation on a series is a sequence of true/false values the same shape as the original series. This a called a "mask". When a mask is used to index the original series it will exclude any items corresponding to false values. This is called "boolean indexing". >>> df = pd.DataFrame({'country' : ['China', 'Japan', 'Russia', 'China'], ... 'data1': [1.2, 2.0, 3.3, 4.4]}) >>> df country data1 0 China 1.2 1 Japan 2.0 2 Russia 3.3 3 China 4.4 >>> df['country'] == 'China' 0 True 1 False 2 False 3 True Name: country, dtype: bool >>> china_mask = df['country'] == 'China' >>> type(china_mask) >>> df[china_mask] country data1 0 China 1.2 3 China 4.4 https://appdividend.com/2019/01/25/pandas-boolean-indexing-example-python-tutorial/ More on reddit.com
🌐 r/learnpython
8
1
January 30, 2022
Start with an empty pandas dataframe/series, and append using a loop

Try not to do this. The way that pandas stores its data makes appending row-by-row like this very inefficient. Instead, consider making a separate dataframe for each tab, and then concatenating them together in one go. If you have to build up row-by-row, consider doing so in a native data structure like a list or a dict, and then converting the whole thing to a dataframe at the end.

More on reddit.com
🌐 r/learnpython
9
20
August 24, 2018
🌐
GeeksforGeeks
geeksforgeeks.org › pandas › python-pandas-series-to_frame
Python | Pandas Series.to_frame() - GeeksforGeeks
July 11, 2024 - The object supports both integer- and label-based indexing and provides a host of methods for performing operations involving the index. Pandas ... Syntax: Series.to_frame(name=None) Parameter : name : The passed name should substitute for the series name (if it has one). Returns : data_frame : DataFrame
🌐
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 ·
Top answer
1 of 9
124

You can transpose the single-row dataframe (which still results in a dataframe) and then squeeze the results into a series (the inverse of to_frame).

Copydf = pd.DataFrame([list(range(5))], columns=["a{}".format(i) for i in range(5)])

>>> df.squeeze(axis=0)
a0    0
a1    1
a2    2
a3    3
a4    4
Name: 0, dtype: int64

Note: To accommodate the point raised by @IanS (even though it is not in the OP's question), test for the dataframe's size. I am assuming that df is a dataframe, but the edge cases are an empty dataframe, a dataframe of shape (1, 1), and a dataframe with more than one row in which case the use should implement their desired functionality.

Copyif df.empty:
    # Empty dataframe, so convert to empty Series.
    result = pd.Series()
elif df.shape == (1, 1)
    # DataFrame with one value, so convert to series with appropriate index.
    result = pd.Series(df.iat[0, 0], index=df.columns)
elif len(df) == 1:
    # Convert to series per OP's question.
    result = df.T.squeeze()
else:
    # Dataframe with multiple rows.  Implement desired behavior.
    pass

This can also be simplified along the lines of the answer provided by @themachinist.

Copyif len(df) > 1:
    # Dataframe with multiple rows.  Implement desired behavior.
    pass
else:
    result = pd.Series() if df.empty else df.iloc[0, :]
2 of 9
84

It's not smart enough to realize it's still a "vector" in math terms.

Say rather that it's smart enough to recognize a difference in dimensionality. :-)

I think the simplest thing you can do is select that row positionally using iloc, which gives you a Series with the columns as the new index and the values as the values:

Copy>>> df = pd.DataFrame([list(range(5))], columns=["a{}".format(i) for i in range(5)])
>>> df
   a0  a1  a2  a3  a4
0   0   1   2   3   4
>>> df.iloc[0]
a0    0
a1    1
a2    2
a3    3
a4    4
Name: 0, dtype: int64
>>> type(_)
<class 'pandas.core.series.Series'>
🌐
GeeksforGeeks
geeksforgeeks.org › python › creating-a-dataframe-from-pandas-series
Creating a dataframe from Pandas series - GeeksforGeeks
July 11, 2025 - Here, we have passed a dictionary that has been created using a series as values then passed this dictionary to create a Dataframe. We can see while creating a Dataframe using Python Dictionary, the keys of the dictionary will become Columns and values will become Rows. ... # Importing pandas library import pandas as pd # Creating dictionary of Series dict1 = {'Auth_Name': pd.Series(['Jitender', 'Purnima', 'Arpit', 'Jyoti']), 'Author_Book_No':\ pd.Series([210, 211, 114, 178]), 'Age': pd.Series([21, 21, 24, 23])} # Creating Dataframe df = pd.DataFrame(dict1) # Printing dataframe print(df)
Find elsewhere
🌐
W3Schools
w3schools.com › python › pandas › pandas_series.asp
Pandas Series
A Pandas Series is like a column in a table. It is a one-dimensional array holding data of any type. ... If nothing else is specified, the values are labeled with their index number. First value has index 0, second value has index 1 etc. This label can be used to access a specified value. ... With the index argument, you can name your own labels. ... import pandas as pd a = [1, 7, 2] myvar = pd.Series(a, index = ["x", "y", "z"]) print(myvar) Try it Yourself »
🌐
Favtutor
favtutor.com › articles › convert-pandas-series-to-dataframe
Convert Pandas Series to DataFrame (3 Methods with Examples)
December 1, 2023 - By passing the Series object as the first argument and providing the column names as a list, we can create a DataFrame with the Series values assigned to the specified column. ... import pandas as pd # Create a Series s = pd.Series([1, 2, 3, ...
🌐
GeeksforGeeks
geeksforgeeks.org › pandas › dataframe-vs-series-in-pandas
DataFrame vs Series in Pandas - GeeksforGeeks
July 23, 2025 - They can be created from lists, arrays, dictionaries, and existing Series objects. Series are also a building block for the more complex Pandas DataFrame, which is a two-dimensional table-like structure consisting of multiple Series objects.
🌐
Note.nkmk.me
note.nkmk.me › home › python › pandas
pandas: Convert between DataFrame and Series | note.nkmk.me
January 20, 2024 - The pandas version used in this article is as follows. Note that functionality may vary between versions. ... To convert a Series to a DataFrame, use the to_frame() method or the pd.DataFrame() constructor.
🌐
Pandas
pandas.pydata.org › docs › getting_started › intro_tutorials › 03_subset_data.html
How do I select a subset of a DataFrame? — pandas 3.0.3 documentation
DataFrame.shape is an attribute (remember tutorial on reading and writing, do not use parentheses for attributes) of a pandas Series and DataFrame containing the number of rows and columns: (nrows, ncolumns). A pandas Series is 1-dimensional and only the number of rows is returned. I’m interested in the age and sex of the Titanic passengers. In [8]: age_sex = titanic[["Age", "Sex"]] In [9]: age_sex.head() Out[9]: Age Sex 0 22.0 male 1 38.0 female 2 26.0 female 3 35.0 female 4 35.0 male · To select multiple columns, use a list of column names within the selection brackets [].
🌐
Reddit
reddit.com › r/learnpython › why does pandas convert my dataframe into a dataframe and a series inside a for loop?
r/learnpython on Reddit: Why does Pandas convert my DataFrame into a DataFrame and a Series inside a for loop?
January 9, 2023 -
arms_bayes_list = pandas.DataFrame(
            {'arms': pandas.Series(arms_bayes), 'priori_mean': pandas.Series(arm_priori_mean_vectorized(arms_bayes)),
             'variance_square': pandas.Series(arm_variance_square_vectorized(arms_bayes)),
             'posterior_mean': pandas.Series(arm_posterior_mean_vectorized(arms_bayes)),
             'posterior_variance_square': pandas.Series(arm_posterior_variance_square_vectorized(arms_bayes)),
             'empirical_mean': pandas.Series(arm_empirical_mean_vectorized(arms_bayes)),
             'mean': pandas.Series(arm_mean_vectorized(arms_bayes)),
             'priori_variance_square': pandas.Series(arm_variance_square_vectorized(arms_bayes))})

        optimal_mean_bayes = numpy.amax(arms_bayes_list[["mean"]])
        print(type(arms_bayes_list))
         # This gives a datatype <class'pandas.core.frame.DataFrame'>
        for round_no in range(int(no_of_rounds)):
            print(type(arms_bayes_list))
            # This gives a datatype             <class'pandas.core.frame.DataFrame'>
<class'pandas.core.series.Series'>

Iterating over the data frame I get the error that Series has no attribute called 'itertuples'/ 'iterrow' so I really can't iterate over the DataFrame.

Well, this is rather mysterious to me. For some reason the type of the DataFrame is different inside the for loop than what it is outside the for loop. I don't think I've made any mistakes but I another set of eyes would definitely help.

🌐
Pandas
pandas.pydata.org › docs › user_guide › dsintro.html
Intro to data structures — pandas 3.0.3 documentation
Series.array will always be an ExtensionArray. Briefly, an ExtensionArray is a thin wrapper around one or more concrete arrays like a numpy.ndarray. pandas knows how to take an ExtensionArray and store it in a Series or a column of a DataFrame.
🌐
Saturn Cloud
saturncloud.io › blog › combining-two-series-into-a-dataframe-in-pandas
Combining two Series into a DataFrame in pandas | Saturn Cloud Blog
June 19, 2023 - Here’s an example of concatenating two Series into a DataFrame: import pandas as pd s1 = pd.Series([1, 2, 3]) s2 = pd.Series(['A', 'B', 'C']) df = pd.concat([s1, s2], axis=1) print(df) ...
🌐
w3resource
w3resource.com › python-exercises › pandas › python-pandas-data-series-exercise-8.php
Pandas Data Series: Convert the first column of a DataFrame as a Series - w3resource
September 5, 2025 - Write a Pandas program to extract a specific column from a DataFrame as a Series and then rename its index using a custom function.
🌐
Quora
quora.com › What-is-the-difference-between-a-pandas-DataFrame-and-a-pandas-Series
What is the difference between a pandas.DataFrame and a pandas.Series? - Quora
Answer (1 of 2): Series is a type of list in pandas which can take integer values, string values, double values and more. But in Pandas Series we return an object in the form of list, having index starting from 0 to n, Where n is the length of values in series. Later in this article, we will disc...
🌐
DEV Community
dev.to › codeitmichael › introduction-to-pandas-series-and-dataframes-18oh
Introduction to Pandas: Series and DataFrames - DEV Community
September 16, 2023 - It has rows and columns which is very useful when creating a table. As I said, series and data frames are related to each other, it is because each column in a data frame is a Series.
🌐
Vultr Docs
docs.vultr.com › python › third-party › pandas › Series › to_frame
Python Pandas Series to_frame() - Convert to DataFrame | Vultr Docs
December 27, 2024 - You will explore how to transform a single Series, include custom column naming, and handle multiple Series conversion, showcasing practical examples relevant to data processing tasks. Import the Pandas library.
🌐
Apache Spark
spark.apache.org
Apache Spark™ - Unified Engine for large-scale data analytics
Apache Spark™ integrates with your favorite frameworks, helping to scale them to thousands of machines.