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() +```