Create a Python code snippet for querying a database and converting the data into a Pandas DataFrame.
A SQL query that returns column names name, age, gender, and location
import pandas as pd
import sqlite3

conn = sqlite3.connect('example.db')

df = pd.read_sql_query("SELECT name, age, gender, location FROM table_name", conn)

conn.close()