aboutsummaryrefslogtreecommitdiffstats
path: root/python/csv_to_db.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/csv_to_db.py')
-rw-r--r--python/csv_to_db.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/python/csv_to_db.py b/python/csv_to_db.py
new file mode 100644
index 00000000..5c0f97aa
--- /dev/null
+++ b/python/csv_to_db.py
@@ -0,0 +1,13 @@
+import pandas as pd
+
+from serenitas.utils.db import dawn_engine
+
+df = pd.read_csv("/home/serenitas/flint/irs_ticket.csv")
+
+df.columns = (
+ df.columns.str.replace(" ", "_").str.replace("[()/]", "", regex=True).str.lower()
+)
+
+df.insert(0, "bbg_ticket_id", "test")
+
+df.to_sql("irs_tickets", con=dawn_engine, index=False, if_exists="append")