Write a Python script that uses the Pandas library to read data from an SQLite database, perform basic data analysis (e.g., calculating mean, median, mode), and output the results to the console. PLAINFORMAT
import sqlite3
import pandas as pd

# Connect to the SQLite database
conn = sqlite3.connect('example.db')

# Read data from the database into a Pandas DataFrame
df = pd.read_sql_query("SELECT * FROM example_table", conn)

# Close the connection to the database
conn.close()

# Calculate mean, median, and mode for each numeric column in the DataFrame
mean_values = df.mean()
median_values = df.median()
mode_values = df.mode().iloc[0]

# Output the results to the console
print("Mean values:")
print(mean_values)
print("\nMedian values:")
print(median_values)
print("\nMode values:")
print(mode_values)