> For the complete documentation index, see [llms.txt](https://hacksoc.gitbook.io/python-classes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacksoc.gitbook.io/python-classes/exercises/pandas.md).

# Pandas

## Create DataFrame

Use the range functions we have looked at previously to create a DataFrame with three columns, the first column should contain the number 1-10 (inclusive), the second should contain the numbers 11-20, and the final column should contain 21-30. Give each column a suitable name. Finally, print out the DataFrame, followed by each column printed separately.

## Graph From File

Load the attached file into a DataFrame, then create a new DataFrame that contains only the first 20 rows. Then create a scatter plot using the first and third columns.

Note: the file does not contain any column headers, you'll need to make sure you tell Python what to call each of your columns when you create the first DataFrame.

{% file src="/files/-LuhM7JLggyigzzA0xKU" %}
Pandas exercise file
{% endfile %}

## Filtered Graph

Create a graph as before in the previous exercise, but this time instead of only the first rows, use all the rows where the third column is larger than the first column.
