#Assuming you uploaded database.db to assets
# for project_lib more
https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/project-lib-python.htmlfrom project_lib import Project
project = Project(project_id='your_project_id', project_access_token='your_tocken')
pc = project.project_context
import sqlite3
sqlitedb=project.get_file('database.db')
conn = sqlite3.connect(sqlitedb)
c = conn.cursor()
c.execute("CREATE TABLE IF NOT EXISTS stuffToPlot(unix REAL, datestamp TEXT, keyword TEXT, value REAL)")
c.execute("INSERT INTO stuffToPlot VALUES(1452549219,'2016-01-11 13:53:39','Python',6)")
c.execute("select * from stuffToPlot")
queryresult=c.fetchall()
print(queryresult)
conn.commit()
c.close()
conn.close()
------------------------------
John Gakhokidze
NPO Torino SRL /CloudZBridge USA
------------------------------
Original Message:
Sent: Mon October 18, 2021 11:22 PM
From: MARK JEYNES
Subject: Need Help with Course Exploratory Data Analysis for Machine Learning
I'm trying to work through the first Watson Studio lab step in this self-paced class.
I'm struggling with the step to get my Jupyter Notebook to read from the sqlite3 db file. Right now it's failing to read the file but not clear what it expects to be in place.
These topics are new to me and it would be great to have someone more experienced I could exchange Q&A with.
Is there anyone out there?
------------------------------
MARK JEYNES
------------------------------
#AIandDSSkills
#DataandAILearning