import sqlite3import pandas as pdfn1=Usersisabellareeserrela.pdf

import sqlite3 import pandas as pd fn1="/Users/isabellareeser/relational database project/cm_2011_table_3_3_child_victims_2011.xlsx" fn2="/Users/isabellareeser/relational database project/cm_2011_table_3_5_victims_by_age_2011.xlsx" fn3="/Users/isabellareeser/relational database project/cm_2011_table_3_7_victims_by_race_and_ethnicity_2011.xlsx" df1=pd.read_excel(fn1) df2=pd.read_excel(fn2) df3=pd.read_excel(fn3) df_1=df1.drop([0,1]) df_2=df2.drop([0,1]) df_3=df3.drop([0,1]) df_1new=df_1.rename(columns={"Table 33 Child Victims, 2011 (unique count)":"State","Unnamed: 1":"Child Population", "Unnamed: 2":"Number of Unique Victims","Unnamed: 3":"Rate per 1,000"}) df_2new=df_2.rename(columns={"Table 35 Victims by Age, 2011 (unique count)":"State","Unnamed: 1":"Age <1 Child Populations", "Unnamed: 2":"Number of Unique Victims Age <1","Unnamed: 3":"Rate per 1,000 Age <1", "Unnamed: 4": "Age 1 Child Populations", "Unnamed: 5": "Number of Unique Victims Age 1", "Unnamed: 6": "Rate per 1,000 Age 1", "Unnamed: 7": "Age 2 Child Populations", "Unnamed: 8": "Number of Unique Victims Age 2", "Unnamed: 9": "Rate per 1,000 Age 2", "Unnamed: 10": "Age 3 Child Populations", "Unnamed: 11": "Number of Unique Victims Age 3", "Unnamed: 12": "Rate per 1,000 Age 3", "Unnamed: 13": "Age 4 Child Populations", "Unnamed: 14": "Number of Unique Victims Age 4", "Unnamed: 15": "Rate per 1,000 Age 4", "Unnamed: 16": "Age 5 Child Populations", "Unnamed: 17": "Number of Unique Victims Age 5", "Unnamed: 18": "Rate per 1,000 Age 5", "Unnamed: 19": "Age 6 Child Populations", "Unnamed: 20": "Number of Unique Victims Age 6", "Unnamed: 21": "Rate per 1,000 Age 6", "Unnamed: 22": "Age 7 Child Populations", "Unnamed: 23": "Number of Unique Victims Age 7", "Unnamed: 24": "Rate per 1,000 Age 7", "Unnamed: 25": "Age 8 Child Populations", "Unnamed: 26": "Number of Unique Victims Age 8", "Unnamed: 27": "Rate per 1,000 Age 8", "Unnamed: 28": "Age 9 Child Populations", "Unnamed: 29": "Number of Unique Victims Age 9", "Unnamed: 30": "Rate per 1,000 Age 9", "Unnamed: 31": "Age 10 Child Populations", "Unnamed: 32": "Number of Unique Victims Age 10", "Unnamed: 33": "Rate per 1,000 Age 10", "Unnamed: 34": "Age 11 Child Populations", "Unnamed: 35": "Number of Unique Victims Age 11", "Unnamed: 36": "Rate per 1,000 Age 11", "Unnamed: 37": "Age 12 Child Populations", "Unnamed: 38": "Number of Unique Victims age 12", "Unnamed: 39": "Rate per 1,000 Age 12", "Unnamed: 40": "Age 13 Child Populations", "Unnamed: 41": "Number of Unique Victims Age 13", "Unnamed: 42": "Rate per 1,000 Age 13", "Unnamed: 43": "Age 14 Child Populations", "Unnamed: 44": "Number of Unique Victims Age 14", "Unnamed: 45": "Rate per 1,000 Age 14", "Unnamed: 46": "Age 15 Child Populations", "Unnamed: 47": "Number of Unique Victims Age 15", "Unnamed: 48": "Rate per 1,000 Age 15", "Unnamed: 49": "Age 16 Child Populations", "Unnamed: 50": "Number of Unique Victims Age 16", "Unnamed: 51": "Rate per 1,000 Age 16", "Unnamed: 52": "Age 17 Ch.

import sqlite3
import pandas as pd
fn1="/Users/isabellareeser/relational database
project/cm_2011_table_3_3_child_victims_2011.xlsx"
fn2="/Users/isabellareeser/relational database
project/cm_2011_table_3_5_victims_by_age_2011.xlsx"
fn3="/Users/isabellareeser/relational database
project/cm_2011_table_3_7_victims_by_race_and_ethnicity_2011.xlsx"
df1=pd.read_excel(fn1)
df2=pd.read_excel(fn2)
df3=pd.read_excel(fn3)
df_1=df1.drop([0,1])
df_2=df2.drop([0,1])
df_3=df3.drop([0,1])
df_1new=df_1.rename(columns={"Table 33 Child Victims, 2011 (unique
count)":"State","Unnamed: 1":"Child Population", "Unnamed: 2":"Number of Unique
Victims","Unnamed: 3":"Rate per 1,000"})
df_2new=df_2.rename(columns={"Table 35 Victims by Age, 2011 (unique
count)":"State","Unnamed: 1":"Age <1 Child Populations", "Unnamed: 2":"Number of Unique
Victims Age <1","Unnamed: 3":"Rate per 1,000 Age <1", "Unnamed: 4": "Age 1 Child
Populations", "Unnamed: 5": "Number of Unique Victims Age 1", "Unnamed: 6": "Rate per
1,000 Age 1", "Unnamed: 7": "Age 2 Child Populations", "Unnamed: 8": "Number of Unique
Victims Age 2", "Unnamed: 9": "Rate per 1,000 Age 2", "Unnamed: 10": "Age 3 Child
Populations", "Unnamed: 11": "Number of Unique Victims Age 3", "Unnamed: 12": "Rate per
1,000 Age 3", "Unnamed: 13": "Age 4 Child Populations", "Unnamed: 14": "Number of Unique
Victims Age 4", "Unnamed: 15": "Rate per 1,000 Age 4", "Unnamed: 16": "Age 5 Child
Populations", "Unnamed: 17": "Number of Unique Victims Age 5", "Unnamed: 18": "Rate per
1,000 Age 5", "Unnamed: 19": "Age 6 Child Populations", "Unnamed: 20": "Number of Unique
Victims Age 6", "Unnamed: 21": "Rate per 1,000 Age 6", "Unnamed: 22": "Age 7 Child
Populations", "Unnamed: 23": "Number of Unique Victims Age 7", "Unnamed: 24": "Rate per
1,000 Age 7", "Unnamed: 25": "Age 8 Child Populations", "Unnamed: 26": "Number of Unique
Victims Age 8", "Unnamed: 27": "Rate per 1,000 Age 8", "Unnamed: 28": "Age 9 Child
Populations", "Unnamed: 29": "Number of Unique Victims Age 9", "Unnamed: 30": "Rate per
1,000 Age 9", "Unnamed: 31": "Age 10 Child Populations", "Unnamed: 32": "Number of Unique
Victims Age 10", "Unnamed: 33": "Rate per 1,000 Age 10", "Unnamed: 34": "Age 11 Child
Populations", "Unnamed: 35": "Number of Unique Victims Age 11", "Unnamed: 36": "Rate per
1,000 Age 11", "Unnamed: 37": "Age 12 Child Populations", "Unnamed: 38": "Number of
Unique Victims age 12", "Unnamed: 39": "Rate per 1,000 Age 12", "Unnamed: 40": "Age 13
Child Populations", "Unnamed: 41": "Number of Unique Victims Age 13", "Unnamed: 42":
"Rate per 1,000 Age 13", "Unnamed: 43": "Age 14 Child Populations", "Unnamed: 44":
"Number of Unique Victims Age 14", "Unnamed: 45": "Rate per 1,000 Age 14", "Unnamed:
46": "Age 15 Child Populations", "Unnamed: 47": "Number of Unique Victims Age 15",
"Unnamed: 48": "Rate per 1,000 Age 15", "Unnamed: 49": "Age 16 Child Populations",
"Unnamed: 50": "Number of Unique Victims Age 16", "Unnamed: 51": "Rate per 1,000 Age
16", "Unnamed: 52": "Age 17 Child Populations", "Unnamed: 53": "Number of Unique Victims
Age 17", "Unnamed: 54": "Rate per 1,000 Age 17", "Unnamed: 55": "Unborn, Unknown, and
18-21", "Unnamed: 56": "Total Unique Victims For Age" })
df_3new=df_3.rename(columns={"Table 37 Victims by Race and Ethnicity, 2011 (unique
count)":"State","Unnamed: 1":"African American Child Populations", "Unnamed: 2":"Number
of Unique Victims African American","Unnamed: 3":"Rate per 1,000 African American",
"Unnamed: 4": "American Indian or Alaska Native Child Populations", "Unnamed: 5": "Number
of Unique Victims American Indian or Alaska Native", "Unnamed: 6": "Rate per 1,000
American Indian or Alaska Native", "Unnamed: 7": "Asian Child Populations", "Unnamed: 8":
"Number of Unique Victims Asian", "Unnamed: 9": "Rate per 1,000 Asian", "Unnamed: 10":
"Hispanic Child Populations", "Unnamed: 11": "Number of Unique Victims Hispanic",
"Unnamed: 12": "Rate per 1,000 Hispanic", "Unnamed: 13": "Multiple Race Child Populations",
"Unnamed: 14": "Number of Unique Victims Multiple Race", "Unnamed: 15": "Rate per 1,000
Multiple Race", "Unnamed: 16": "Pacific Islander Child Populations", "Unnamed: 17": "Number
of Unique Victims Pacific Islander", "Unnamed: 18": "Rate per 1,000 Pacific Islander",
"Unnamed: 19": "White Child Populations", "Unnamed: 20": "Number of Unique Victims
White", "Unnamed: 21": "Rate per 1,000 White", "Unnamed: 22": "Unknown Child
Populations", "Unnamed: 23": "Total Number of Unique Victims for Race" })
state=df_1new.drop([54,55,56]) age=df_2new.drop([54,55,56,57])
race=df_3new.drop([54,55,56,57,58,59,60])
race=pd.merge(state,race,on="State",how="outer")
con=sqlite3.connect("ChildMaltreatment.db")
cur=con.cursor() cur.execute("PRAGMA foreign_keys=ON;")
res=cur.execute("PRAGMA foreign_keys") res.fetchall()
q='''CREATE TABLE racetable ( State TEXT, Child_Population INTEGER,
Number_of_Unique_Victims INTEGER, Rate_per_1000 FLOAT,
African_American_Child_Populations INTEGER,
Number_of_Unique_Victims_African_American INTEGER, Rate_per_1000_African_American
FLOAT, American_Indian_or_Alaska_Native_Child_Population INTEGER,
Number_of_Unique_Victims_American_Indian_or_Alaska_Native INTEGER,
Rate_per_1000_American_Indian_or_Alaska_Native FLOAT, Asian_Child_Populations
INTEGER, Number_of_Unique_Victims_Asian INTEGER, Rate_per_1000_Asian FLOAT,
Hispanic_Child_Populations INTEGER, Number_of_Unique_Victims_Hispanic INTEGER,
Rate_per_1000_Hispanic FLOAT, Multiple_Race_Child_Populations INTEGER,
Number_of_Unique_Victims_Multiple_Race INTEGER, Rate_per_1000_Multiple_Race
FLOAT, Pacific_Islander_Child_Populations INTEGER,
Number_of_Unique_Victims_Pacific_Islander INTEGER, Rate_per_1000_Pacific_Islander
FLOAT, White_Child_Populations INTEGER, Number_of_Unique_Victims_White INTEGER,
Rate_per_1000_White FLOAT, Unknown_Child_Populations INTEGER,
Total_Number_of_Unique_Victims_for_Race INTEGER, PRIMARY KEY
(Total_Number_of_Unique_Victims_for_Race) );'''
cur.execute(q)
con.commit()
q='''CREATE TABLE agetable( State TEXT, Age_less_than_1_Child_Population INTEGER,
Number_of_Unique_Victims_Age_less_than_1 INTEGER, Rate_per_1000_Age_less_than_1
FLOAT, Age_1_Child_Populations INTEGER, Number_of_Unique_Victims_Age_1
INTEGER, Rate_per_1000_Age_1 FLOAT, Age_2_Child_Populations INTEGER,
Number_of_Unique_Victims_Age_2 INTEGER, Rate_per_1000_Age_2 FLOAT,
Age_3_Child_Populations INTEGER, Number_of_Unique_Victims_Age_3 INTEGER,
Rate_per_1000_Age_3 FLOAT, Age_4_Child_Populations INTEGER,
Number_of_Unique_Victims_Age_4 INTEGER, Rate_per_1000_Age_4 FLOAT,
Age_5_Child_Populations INTEGER, Number_of_Unique_Victims_Age_5 INTEGER,
Rate_per_1000_Age_5 FLOAT, Age_6_Child_Populations INTEGER,
Number_of_Unique_Victims_Age_6 INTEGER, Rate_per_1000_Age_6 FLOAT,
Age_7_Child_Populations INTEGER, Number_of_Unique_Victims_Age_7 INTEGER,
Rate_per_1000_Age_7 FLOAT, Age_8_Child_Populations INTEGER,
Number_of_Unique_Victims_Age_8 INTEGER, Rate_per_1000_Age_8 FLOAT,
Age_9_Child_Populations INTEGER, Number_of_Unique_Victims_Age_9 INTEGER,
Rate_per_1000_Age_9 FLOAT, Age_10_Child_Populations INTEGER,
Number_of_Unique_Victims_Age_10 INTEGER, Rate_per_1000_Age_10 FLOAT,
Age_11_Child_Populations INTEGER, Number_of_Unique_Victims_Age_11 INTEGER,
Rate_per_1000_Age_11 FLOAT, Age_12_Child_Populations INTEGER,
Number_of_Unique_Victims_age_12 INTEGER, Rate_per_1000_Age_12 FLOAT,
Age_13_Child_Populations INTEGER, Number_of_Unique_Victims_Age_13 INTEGER,
Rate_per_1000_Age_13 FLOAT, Age_14_Child_Populations INTEGER,
Number_of_Unique_Victims_Age_14 INTEGER, Rate_per_1000_Age_14 FLOAT,
Age_15_Child_Populations INTEGER, Number_of_Unique_Victims_Age_15 INTEGER,
Rate_per_1000_Age_15 FLOAT, Age_16_Child_Populations INTEGER,
Number_of_Unique_Victims_Age_16 INTEGER, Rate_per_1000_Age_16 FLOAT,
Age_17_Child_Populations INTEGER, Number_of_Unique_Victims_Age_17 INTEGER,
Rate_per_1000_Age_17 FLOAT, Unborn_Unknown_and_18_to_21 INTEGER,
Total_Unique_Victims_For_Age INTEGER, PRIMARY
KEY(Total_Unique_Victims_For_Age) );'''
cur.execute(q)
con.commit()
q='''INSERT INTO racetable SELECT * FROM race'''
cur.execute(q)
con.commit()
q='''INSERT INTO agetable SELECT * FROM age'''
cur.execute(q)
con.commit()
I keep getting an error saying race and age doesnt exist when I try insert into. Please help.

Más contenido relacionado

Más de maheshkumar12354(20)

Último(20)

Use of Probiotics in Aquaculture.pptxUse of Probiotics in Aquaculture.pptx
Use of Probiotics in Aquaculture.pptx
AKSHAY MANDAL69 vistas
ANATOMY AND PHYSIOLOGY UNIT 1 { PART-1}ANATOMY AND PHYSIOLOGY UNIT 1 { PART-1}
ANATOMY AND PHYSIOLOGY UNIT 1 { PART-1}
DR .PALLAVI PATHANIA156 vistas
CWP_23995_2013_17_11_2023_FINAL_ORDER.pdfCWP_23995_2013_17_11_2023_FINAL_ORDER.pdf
CWP_23995_2013_17_11_2023_FINAL_ORDER.pdf
SukhwinderSingh895865467 vistas
Narration lesson plan.docxNarration lesson plan.docx
Narration lesson plan.docx
Tariq KHAN90 vistas
Nico Baumbach IMR Media ComponentNico Baumbach IMR Media Component
Nico Baumbach IMR Media Component
InMediaRes1186 vistas
Material del tarjetero LEES Travesías.docxMaterial del tarjetero LEES Travesías.docx
Material del tarjetero LEES Travesías.docx
Norberto Millán Muñoz57 vistas
Classification of crude drugs.pptxClassification of crude drugs.pptx
Classification of crude drugs.pptx
GayatriPatra1449 vistas
Scope of Biochemistry.pptxScope of Biochemistry.pptx
Scope of Biochemistry.pptx
shoba shoba110 vistas
STERILITY TEST.pptxSTERILITY TEST.pptx
STERILITY TEST.pptx
Anupkumar Sharma102 vistas
Women from Hackney’s History: Stoke Newington by Sue DoeWomen from Hackney’s History: Stoke Newington by Sue Doe
Women from Hackney’s History: Stoke Newington by Sue Doe
History of Stoke Newington103 vistas
AI Tools for Business and StartupsAI Tools for Business and Startups
AI Tools for Business and Startups
Svetlin Nakov57 vistas
Lecture: Open InnovationLecture: Open Innovation
Lecture: Open Innovation
Michal Hron82 vistas
Sociology KS5Sociology KS5
Sociology KS5
WestHatch50 vistas
discussion post.pdfdiscussion post.pdf
discussion post.pdf
jessemercerail70 vistas
Azure DevOps Pipeline setup for Mule APIs #36Azure DevOps Pipeline setup for Mule APIs #36
Azure DevOps Pipeline setup for Mule APIs #36
MysoreMuleSoftMeetup75 vistas
Plastic waste.pdfPlastic waste.pdf
Plastic waste.pdf
alqaseedae81 vistas

import sqlite3import pandas as pdfn1=Usersisabellareeserrela.pdf

  • 1. import sqlite3 import pandas as pd fn1="/Users/isabellareeser/relational database project/cm_2011_table_3_3_child_victims_2011.xlsx" fn2="/Users/isabellareeser/relational database project/cm_2011_table_3_5_victims_by_age_2011.xlsx" fn3="/Users/isabellareeser/relational database project/cm_2011_table_3_7_victims_by_race_and_ethnicity_2011.xlsx" df1=pd.read_excel(fn1) df2=pd.read_excel(fn2) df3=pd.read_excel(fn3) df_1=df1.drop([0,1]) df_2=df2.drop([0,1]) df_3=df3.drop([0,1]) df_1new=df_1.rename(columns={"Table 33 Child Victims, 2011 (unique count)":"State","Unnamed: 1":"Child Population", "Unnamed: 2":"Number of Unique Victims","Unnamed: 3":"Rate per 1,000"}) df_2new=df_2.rename(columns={"Table 35 Victims by Age, 2011 (unique count)":"State","Unnamed: 1":"Age <1 Child Populations", "Unnamed: 2":"Number of Unique Victims Age <1","Unnamed: 3":"Rate per 1,000 Age <1", "Unnamed: 4": "Age 1 Child Populations", "Unnamed: 5": "Number of Unique Victims Age 1", "Unnamed: 6": "Rate per 1,000 Age 1", "Unnamed: 7": "Age 2 Child Populations", "Unnamed: 8": "Number of Unique Victims Age 2", "Unnamed: 9": "Rate per 1,000 Age 2", "Unnamed: 10": "Age 3 Child Populations", "Unnamed: 11": "Number of Unique Victims Age 3", "Unnamed: 12": "Rate per 1,000 Age 3", "Unnamed: 13": "Age 4 Child Populations", "Unnamed: 14": "Number of Unique Victims Age 4", "Unnamed: 15": "Rate per 1,000 Age 4", "Unnamed: 16": "Age 5 Child Populations", "Unnamed: 17": "Number of Unique Victims Age 5", "Unnamed: 18": "Rate per 1,000 Age 5", "Unnamed: 19": "Age 6 Child Populations", "Unnamed: 20": "Number of Unique Victims Age 6", "Unnamed: 21": "Rate per 1,000 Age 6", "Unnamed: 22": "Age 7 Child Populations", "Unnamed: 23": "Number of Unique Victims Age 7", "Unnamed: 24": "Rate per 1,000 Age 7", "Unnamed: 25": "Age 8 Child Populations", "Unnamed: 26": "Number of Unique Victims Age 8", "Unnamed: 27": "Rate per 1,000 Age 8", "Unnamed: 28": "Age 9 Child Populations", "Unnamed: 29": "Number of Unique Victims Age 9", "Unnamed: 30": "Rate per 1,000 Age 9", "Unnamed: 31": "Age 10 Child Populations", "Unnamed: 32": "Number of Unique Victims Age 10", "Unnamed: 33": "Rate per 1,000 Age 10", "Unnamed: 34": "Age 11 Child
  • 2. Populations", "Unnamed: 35": "Number of Unique Victims Age 11", "Unnamed: 36": "Rate per 1,000 Age 11", "Unnamed: 37": "Age 12 Child Populations", "Unnamed: 38": "Number of Unique Victims age 12", "Unnamed: 39": "Rate per 1,000 Age 12", "Unnamed: 40": "Age 13 Child Populations", "Unnamed: 41": "Number of Unique Victims Age 13", "Unnamed: 42": "Rate per 1,000 Age 13", "Unnamed: 43": "Age 14 Child Populations", "Unnamed: 44": "Number of Unique Victims Age 14", "Unnamed: 45": "Rate per 1,000 Age 14", "Unnamed: 46": "Age 15 Child Populations", "Unnamed: 47": "Number of Unique Victims Age 15", "Unnamed: 48": "Rate per 1,000 Age 15", "Unnamed: 49": "Age 16 Child Populations", "Unnamed: 50": "Number of Unique Victims Age 16", "Unnamed: 51": "Rate per 1,000 Age 16", "Unnamed: 52": "Age 17 Child Populations", "Unnamed: 53": "Number of Unique Victims Age 17", "Unnamed: 54": "Rate per 1,000 Age 17", "Unnamed: 55": "Unborn, Unknown, and 18-21", "Unnamed: 56": "Total Unique Victims For Age" }) df_3new=df_3.rename(columns={"Table 37 Victims by Race and Ethnicity, 2011 (unique count)":"State","Unnamed: 1":"African American Child Populations", "Unnamed: 2":"Number of Unique Victims African American","Unnamed: 3":"Rate per 1,000 African American", "Unnamed: 4": "American Indian or Alaska Native Child Populations", "Unnamed: 5": "Number of Unique Victims American Indian or Alaska Native", "Unnamed: 6": "Rate per 1,000 American Indian or Alaska Native", "Unnamed: 7": "Asian Child Populations", "Unnamed: 8": "Number of Unique Victims Asian", "Unnamed: 9": "Rate per 1,000 Asian", "Unnamed: 10": "Hispanic Child Populations", "Unnamed: 11": "Number of Unique Victims Hispanic", "Unnamed: 12": "Rate per 1,000 Hispanic", "Unnamed: 13": "Multiple Race Child Populations", "Unnamed: 14": "Number of Unique Victims Multiple Race", "Unnamed: 15": "Rate per 1,000 Multiple Race", "Unnamed: 16": "Pacific Islander Child Populations", "Unnamed: 17": "Number of Unique Victims Pacific Islander", "Unnamed: 18": "Rate per 1,000 Pacific Islander", "Unnamed: 19": "White Child Populations", "Unnamed: 20": "Number of Unique Victims White", "Unnamed: 21": "Rate per 1,000 White", "Unnamed: 22": "Unknown Child Populations", "Unnamed: 23": "Total Number of Unique Victims for Race" }) state=df_1new.drop([54,55,56]) age=df_2new.drop([54,55,56,57]) race=df_3new.drop([54,55,56,57,58,59,60]) race=pd.merge(state,race,on="State",how="outer") con=sqlite3.connect("ChildMaltreatment.db") cur=con.cursor() cur.execute("PRAGMA foreign_keys=ON;") res=cur.execute("PRAGMA foreign_keys") res.fetchall() q='''CREATE TABLE racetable ( State TEXT, Child_Population INTEGER, Number_of_Unique_Victims INTEGER, Rate_per_1000 FLOAT, African_American_Child_Populations INTEGER,
  • 3. Number_of_Unique_Victims_African_American INTEGER, Rate_per_1000_African_American FLOAT, American_Indian_or_Alaska_Native_Child_Population INTEGER, Number_of_Unique_Victims_American_Indian_or_Alaska_Native INTEGER, Rate_per_1000_American_Indian_or_Alaska_Native FLOAT, Asian_Child_Populations INTEGER, Number_of_Unique_Victims_Asian INTEGER, Rate_per_1000_Asian FLOAT, Hispanic_Child_Populations INTEGER, Number_of_Unique_Victims_Hispanic INTEGER, Rate_per_1000_Hispanic FLOAT, Multiple_Race_Child_Populations INTEGER, Number_of_Unique_Victims_Multiple_Race INTEGER, Rate_per_1000_Multiple_Race FLOAT, Pacific_Islander_Child_Populations INTEGER, Number_of_Unique_Victims_Pacific_Islander INTEGER, Rate_per_1000_Pacific_Islander FLOAT, White_Child_Populations INTEGER, Number_of_Unique_Victims_White INTEGER, Rate_per_1000_White FLOAT, Unknown_Child_Populations INTEGER, Total_Number_of_Unique_Victims_for_Race INTEGER, PRIMARY KEY (Total_Number_of_Unique_Victims_for_Race) );''' cur.execute(q) con.commit() q='''CREATE TABLE agetable( State TEXT, Age_less_than_1_Child_Population INTEGER, Number_of_Unique_Victims_Age_less_than_1 INTEGER, Rate_per_1000_Age_less_than_1 FLOAT, Age_1_Child_Populations INTEGER, Number_of_Unique_Victims_Age_1 INTEGER, Rate_per_1000_Age_1 FLOAT, Age_2_Child_Populations INTEGER, Number_of_Unique_Victims_Age_2 INTEGER, Rate_per_1000_Age_2 FLOAT, Age_3_Child_Populations INTEGER, Number_of_Unique_Victims_Age_3 INTEGER, Rate_per_1000_Age_3 FLOAT, Age_4_Child_Populations INTEGER, Number_of_Unique_Victims_Age_4 INTEGER, Rate_per_1000_Age_4 FLOAT, Age_5_Child_Populations INTEGER, Number_of_Unique_Victims_Age_5 INTEGER, Rate_per_1000_Age_5 FLOAT, Age_6_Child_Populations INTEGER, Number_of_Unique_Victims_Age_6 INTEGER, Rate_per_1000_Age_6 FLOAT, Age_7_Child_Populations INTEGER, Number_of_Unique_Victims_Age_7 INTEGER, Rate_per_1000_Age_7 FLOAT, Age_8_Child_Populations INTEGER, Number_of_Unique_Victims_Age_8 INTEGER, Rate_per_1000_Age_8 FLOAT, Age_9_Child_Populations INTEGER, Number_of_Unique_Victims_Age_9 INTEGER, Rate_per_1000_Age_9 FLOAT, Age_10_Child_Populations INTEGER, Number_of_Unique_Victims_Age_10 INTEGER, Rate_per_1000_Age_10 FLOAT, Age_11_Child_Populations INTEGER, Number_of_Unique_Victims_Age_11 INTEGER, Rate_per_1000_Age_11 FLOAT, Age_12_Child_Populations INTEGER, Number_of_Unique_Victims_age_12 INTEGER, Rate_per_1000_Age_12 FLOAT,
  • 4. Age_13_Child_Populations INTEGER, Number_of_Unique_Victims_Age_13 INTEGER, Rate_per_1000_Age_13 FLOAT, Age_14_Child_Populations INTEGER, Number_of_Unique_Victims_Age_14 INTEGER, Rate_per_1000_Age_14 FLOAT, Age_15_Child_Populations INTEGER, Number_of_Unique_Victims_Age_15 INTEGER, Rate_per_1000_Age_15 FLOAT, Age_16_Child_Populations INTEGER, Number_of_Unique_Victims_Age_16 INTEGER, Rate_per_1000_Age_16 FLOAT, Age_17_Child_Populations INTEGER, Number_of_Unique_Victims_Age_17 INTEGER, Rate_per_1000_Age_17 FLOAT, Unborn_Unknown_and_18_to_21 INTEGER, Total_Unique_Victims_For_Age INTEGER, PRIMARY KEY(Total_Unique_Victims_For_Age) );''' cur.execute(q) con.commit() q='''INSERT INTO racetable SELECT * FROM race''' cur.execute(q) con.commit() q='''INSERT INTO agetable SELECT * FROM age''' cur.execute(q) con.commit() I keep getting an error saying race and age doesnt exist when I try insert into. Please help.