Create a DataFrame

Learn how to create a DataFrame by using different data structures.

Although we mostly read data from an external file, Pandas also allows for creating your own DataFrame.

Python dictionary

One of the most commonly used methods to do so is with a Python dictionary. We just pass a dictionary to the DataFrame constructor.

Get hands-on with 1200+ tech skills courses.