Skip to content

Commit

Permalink
fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
bekomay26 committed Jun 21, 2021
1 parent 699257a commit 19fb8f5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion etl.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
"metadata": {},
"outputs": [],
"source": [
"time_data = list(zip(t.dt.time, t.dt.hour, t.dt.day, t.dt.isocalendar().week, t.dt.month, t.dt.year, t.dt.weekday))\n",
"time_data = list(zip(t.dt.values, t.dt.hour, t.dt.day, t.dt.week, t.dt.month, t.dt.year, t.dt.weekday))\n",
"column_labels = ('start_time', 'hour', 'day', 'week', 'month', 'year', 'weekday')"
]
},
Expand Down
2 changes: 1 addition & 1 deletion etl.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def process_log_file(cur, filepath):
t = df["ts"]

# insert time data records
time_data = list(zip(t.dt.time, t.dt.hour, t.dt.day, t.dt.isocalendar().week, t.dt.month, t.dt.year, t.dt.weekday))
time_data = list(zip(t.dt.values, t.dt.hour, t.dt.day, t.dt.week, t.dt.month, t.dt.year, t.dt.weekday))
column_labels = ('start_time', 'hour', 'day', 'week', 'month', 'year', 'weekday')
time_df = pd.DataFrame(time_data, columns=column_labels)

Expand Down
4 changes: 2 additions & 2 deletions sql_queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
start_time timestamp NOT NULL,
user_id varchar NOT NULL,
level varchar,
song_id char(18) NOT NULL,
artist_id char(18) NOT NULL,
song_id char(18),
artist_id char(18),
session_id int NOT NULL,
location varchar,
user_agent varchar
Expand Down

0 comments on commit 19fb8f5

Please sign in to comment.