Page 1 of 1

Lab1 Purpose: Create and use a Database Data Files:Use BS4, Regular Expressions or Pandas to read in the two data files

Posted: Fri Apr 29, 2022 6:34 am
by answerhappygod
Lab1
Purpose: Create and use a Database
Data Files:Use BS4, Regular Expressions or Pandas to read in the
two data files for this assignment:
Co2.html:
<TBODY><TR><TD>2002</TD><TD>4</TD><TD>2002.292</TD>...

<TBODY><TR><TD>2002</TD><TD>5</TD><TD>2002.375</TD>...

<TBODY><TR><TD>2002</TD><TD>6</TD><TD>2002.458</TD>...

...
SeaLevel.csv
2002.3797,3.43000,1.23000,,
2002.4069,1.13000,0.33000,,
2002.4340,-5.67000,-2.17000,,
...
Where necessary, reduce the data from either Monthly or Daily to
Annual data. Use Python iterators and reducers to handle
converting the data to Annual data. Store the data in a Pandas
Dataframe.
Database:
Store the Dataframes in an SQLite data base. Design a
class to interface to the SQLite database:
class Database:
def __init__(self):
self.db =
sqliteConnection()
...
and add functionality for table creation, inserting, searching
and deleting entries in the database.
An additional feature is to program an automatic "query_builder"
that can build database queries for any database operation.
The QueryBuilder also needs to support any type of data that
is required for the operation. Please refer to Sqlite.py example
file for examples of building queries for different operations.
Usage: Insert the Dataframes from the datafiles, or the
dataframe data, into your Database. Validate your Database
operations by outputting the stored data.