You need convert list
to numpy array
and then reshape
:
df = pd.DataFrame(np.array(my_list).reshape(3,3), columns = list("abc"))
print (df)
a b c
0 1 2 3
1 4 5 6
2 7 8 9
More Related Contents:
- Python pandas insert list into a cell
- Pandas DataFrame to List of Dictionaries
- Pandas DataFrame stored list as string: How to convert back to list
- Merge multiple column values into one column in python pandas
- Pandas expand rows from list data available in column
- python pandas flatten a dataframe to a list
- “unstack” a pandas column containing lists into multiple rows [duplicate]
- Why does df.apply(tuple) work but not df.apply(list)?
- Convert List to Pandas Dataframe Column
- How do I select rows from a DataFrame based on column values?
- Aggregation in Pandas
- Constructing pandas DataFrame from values in variables gives “ValueError: If using all scalar values, you must pass an index”
- Selecting a row of pandas series/dataframe by integer index
- How do I find the closest values in a Pandas series to an input number?
- How do I count the NaN values in a column in pandas DataFrame?
- getting the index of a row in a pandas apply function
- Tilde sign in pandas DataFrame
- Drop columns whose name contains a specific string from pandas DataFrame
- Python Pandas How to assign groupby operation results back to columns in parent dataframe?
- python Pandas DataFrame copy(deep=False) vs copy(deep=True) vs ‘=’
- From password-protected Excel file to pandas DataFrame
- How can repetitive rows of data be collected in a single row in pandas?
- Dynamically filtering a pandas dataframe
- Remove substring from column based on another column
- Got continuous is not supported error in RandomForestRegressor
- How to convert string representation of dictionary in Pandas DataFrame to a new columns?
- Get the row corresponding to the max in pandas GroupBy [duplicate]
- Copy text between parentheses in pandas DataFrame column into another column
- Get frequency of item occurrences in a column as percentage [duplicate]
- Pandas explode multiple columns [duplicate]