This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import needed package | |
import pandas as pd | |
#read file and create dataframe | |
df = pd.read_csv(r"file_path.csv", encoding= 'unicode_escape') | |
df.head() #view head of dataframe | |
#convert timestamp/datetime/etc column... from object (or other) datatype to datetime datatype if needed. | |
#longest process in this script if needed, otherwise ignore. | |
df['timestamp'] = df['timestamp'].apply(pd.Timestamp) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tv | sales | ||
---|---|---|---|
230.1 | 22.1 | ||
44.5 | 10.4 | ||
17.2 | 9.3 | ||
151.5 | 18.5 | ||
180.8 | 12.9 | ||
8.7 | 7.2 | ||
57.5 | 11.8 | ||
120.2 | 13.2 | ||
8.6 | 4.8 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
food_exp | income | ||
---|---|---|---|
115.22 | 3.69 | ||
135.98 | 4.39 | ||
119.34 | 4.75 | ||
114.96 | 6.03 | ||
187.05 | 12.47 | ||
243.92 | 12.98 | ||
267.43 | 14.2 | ||
238.71 | 14.76 | ||
295.94 | 15.32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Update example script 3 (final) | |
update region_table | |
set isopen = 'Y' | |
, isavailable = 'N' | |
, isrestricted = 'Y' | |
, user_last_modified = 'user_migration' | |
, date_last_modified = sysdate | |
where state_plan_id = ( | |
select table_id | |
from state_table st |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Update example script 2 | |
"update region_table | |
set isopen = 'Y' | |
, isavailable = 'N' | |
, isrestricted = 'Y' | |
, user_last_modified = 'user_migration' | |
, date_last_modified = sysdate | |
where state_plan_id = ( | |
select table_id | |
from state_table st |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Update example script 1 | |
= "update region_table | |
set isopen = 'Y' "&" | |
, isavailable = 'N' | |
, isrestricted = 'Y' | |
, user_last_modified = 'user_migration' | |
, date_last_modified = sysdate | |
where state_plan_id = ( | |
select table_id "&" | |
from state_table st |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE IF NOT EXISTS red_wine | |
( | |
id INTEGER PRIMARY KEY AUTOINCREMENT, | |
fixed_acidity REAL NOT NULL, | |
volatile_acidity REAL NOT NULL, | |
citric_acid REAL NOT NULL, | |
residual_sugar REAL NOT NULL, | |
chlorides REAL NOT NULL, | |
free_sulfur_dioxide INTEGER NOT NULL, | |
total_sulfur_dioxide INTEGER NOT NULL, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE IF NOT EXISTS red_wine | |
( | |
id INTEGER PRIMARY KEY AUTOINCREMENT, | |
fixed_acidity REAL NOT NULL, | |
volatile_acidity REAL NOT NULL, | |
citric_acid REAL NOT NULL, | |
residual_sugar REAL NOT NULL, | |
chlorides REAL NOT NULL, | |
free_sulfur_dioxide INTEGER NOT NULL, | |
total_sulfur_dioxide INTEGER NOT NULL, |
NewerOlder