Creating a Pandas DataFrame Last Updated : 11 Jul, 2025 Comments Improve Suggest changes Like Article Like Report Pandas DataFrame comes is a powerful tool that allows us to store and manipulate data in a structured way, similar to an Excel spreadsheet or a SQL table. A DataFrame is similar to a table with rows and columns. It helps in handling large amounts of data, performing calculations, filtering information with ease.Creating an Empty DataFrameAn empty DataFrame in pandas is a table with no data but can have defined column names and indexes. It is useful for setting up a structure before adding data dynamically. An empty DataFrame can be created just by calling a dataframe constructor. Python import pandas as pd df = pd.DataFrame() print(df) OutputEmpty DataFrame Columns: [] Index: [] Creating a DataFrame from a ListA simple way to create a DataFrame is by using a single list. Pandas automatically assigns index values to the rows when you pass a list.Each item in the list becomes a row.The DataFrame consists of a single unnamed column. Python import pandas as pd lst = ['Geeks', 'For', 'Geeks', 'is', 'portal', 'for', 'Geeks'] df = pd.DataFrame(lst) print(df) Output 0 0 Geeks 1 For 2 Geeks 3 is 4 portal 5 for 6 Geeks Creating DataFrame from dict of Numpy ArrayWe can create a Pandas DataFrame using a dictionary of NumPy arrays. Each key in the dictionary represents a column name and the corresponding NumPy array provides the values for that column. Python import numpy as np import pandas as pd data = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) df = pd.DataFrame(data, columns=['A', 'B', 'C']) print(df) Output A B C 0 1 2 3 1 4 5 6 2 7 8 9 Creating a DataFrame from a List of Dictionaries We can also create dataframe using List of Dictionaries. It represents data where each dictionary corresponds to a row. This method is useful for handling structured data from APIs or JSON files. It is commonly used in web scraping and API data processing since JSON responses often contain lists of dictionaries. Python import pandas as pd dict = {'name':["aparna", "pankaj", "sudhir", "Geeku"], 'degree': ["MBA", "BCA", "M.Tech", "MBA"], 'score':[90, 40, 80, 98]} df = pd.DataFrame(dict) print(df) Output name degree score 0 aparna MBA 90 1 pankaj BCA 40 2 sudhir M.Tech 80 3 Geeku MBA 98 To understand more methods of creating dataframe in detail refer to:Different ways to create Pandas DataframeCreate pandas dataframe from lists using zipCreate a Pandas DataFrame from List of Dicts Comment More info A abhishek1 Follow Improve Article Tags : Pandas AI-ML-DS Explore Pandas Tutorial 6 min read IntroductionPandas Introduction 3 min read How to Install Pandas in Python? 5 min read How To Use Jupyter Notebook - An Ultimate Guide 5 min read Creating ObjectsCreating a Pandas DataFrame 2 min read Python Pandas Series 5 min read Creating a Pandas Series 3 min read Viewing DataPandas Dataframe/Series.head() method - Python 3 min read Pandas Dataframe/Series.tail() method - Python 3 min read Pandas DataFrame describe() Method 4 min read Selection & SlicingDealing with Rows and Columns in Pandas DataFrame 5 min read Pandas Extracting rows using .loc[] - Python 3 min read Extracting rows using Pandas .iloc[] in Python 7 min read Indexing and Selecting Data with Pandas 4 min read Boolean Indexing in Pandas 6 min read Python | Pandas DataFrame.ix[ ] 2 min read Python | Pandas Series.str.slice() 3 min read How to take column-slices of DataFrame in Pandas? 2 min read OperationsPython | Pandas.apply() 4 min read Apply function to every row in a Pandas DataFrame 3 min read Python | Pandas Series.apply() 3 min read Pandas dataframe.aggregate() | Python 2 min read Pandas DataFrame mean() Method 2 min read Python | Pandas Series.mean() 2 min read Python | Pandas dataframe.mad() 2 min read Python | Pandas Series.mad() to calculate Mean Absolute Deviation of a Series 2 min read Python | Pandas dataframe.sem() 3 min read Python | Pandas Series.value_counts() 2 min read Pandas Index.value_counts()-Python 3 min read Applying Lambda functions to Pandas Dataframe 6 min read Manipulating DataAdding New Column to Existing DataFrame in Pandas 6 min read Python | Delete rows/columns from DataFrame using Pandas.drop() 4 min read Python | Pandas DataFrame.truncate 3 min read Python | Pandas Series.truncate() 2 min read Iterating over rows and columns in Pandas DataFrame 4 min read Pandas Dataframe.sort_values() 2 min read Python | Pandas Dataframe.sort_values() | Set-2 3 min read How to add one row in existing Pandas DataFrame? 4 min read Grouping DataPandas GroupBy 4 min read Grouping Rows in pandas 2 min read Combining Multiple Columns in Pandas groupby with Dictionary 2 min read Merging, Joining, Concatenating and ComparingPython | Pandas Merging, Joining and Concatenating 8 min read Python | Pandas Series.str.cat() to concatenate string 3 min read Python - Pandas dataframe.append() 4 min read Python | Pandas Series.append() 4 min read Pandas Index.append() - Python 2 min read Python | Pandas Series.combine() 3 min read Add a row at top in pandas DataFrame 1 min read Python | Pandas str.join() to join string/list elements with passed delimiter 2 min read Join two text columns into a single column in Pandas 2 min read How To Compare Two Dataframes with Pandas compare? 5 min read How to compare the elements of the two Pandas Series? 3 min read Working with Date and TimePython | Working with date and time using Pandas 8 min read Python | Pandas Timestamp.timestamp 3 min read Python | Pandas Timestamp.now 3 min read Python | Pandas Timestamp.isoformat 2 min read Python | Pandas Timestamp.date 2 min read Python | Pandas Timestamp.replace 3 min read Pandas.to_datetime()-Python 3 min read Python | pandas.date_range() method 4 min read Like