From 7e2abe660f88ef59aec8df239c50bca8b4d915aa Mon Sep 17 00:00:00 2001 From: levdoescode Date: Wed, 1 Mar 2023 01:43:35 -0500 Subject: [PATCH] Week 8 notes completed --- .../Week 8/Week 8 notes.md | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/CM3010 Databases and Advanced Data Techniques/Week 8/Week 8 notes.md b/CM3010 Databases and Advanced Data Techniques/Week 8/Week 8 notes.md index dd98eb8..26e8d71 100644 --- a/CM3010 Databases and Advanced Data Techniques/Week 8/Week 8 notes.md +++ b/CM3010 Databases and Advanced Data Techniques/Week 8/Week 8 notes.md @@ -89,3 +89,30 @@ connection.query(insertCommand, ); ``` +### Python for data +* Graphing + * Matlibplot / Pyplot +* Data analysis and ML + * Numpy + * Pandas + * TensorFlow +* Web crawling and scraping + * BeautifulSoup + +### Querying +```python +curosr = conn.cursor() +cursor.execute(query) +result = cursor.fetchall() +for row in cursor: + print(row['diameter']) # get column in row by name +``` + +### Transactions +auto_commit is OFF by default +Everything is considered a transaction and the changes need to be committed +```python +cursor.execute(update1) +cursor.execute(update2) +cursor.commit() +```