How do I specify the primary key of the table? If doing this with standard SQL I would use:
CREATE TABLE table (
uid TEXT PRIMARY KEY NOT NULL,\
age SMALLINT NOT NULL,\
gen TEXT NOT NULL,\
eth TEXT NOT NULL,\
biu BOOLEAN NOT NULL,\
pst TEXT NOT NULL,\
jse TEXT NOT NULL,\
emp TEXT NOT NULL,\
inc INT NOT NULL,\
own BOOLEAN NOT NULL,\
edu INT NOT NULL,\
res TEXT NOT NULL);
And then fill the table using INSERT queries. Pandas function df.to_sql() does not seem to allow me to define the primary key. I can specify a dict 'dtype' to specify the datatype for each column, but I can't find a way to specify the primary key, or to specify 'NOT NULL'
I have a bit of experience with SQLite with Python, but I'm totally new to PostgreSQL.