Create a DataFrame
Learn how to create a DataFrame by using different data structures.
We'll cover the following
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 1400+ tech skills courses.