Question 3 Not complete Mark 0.00 out of 5.00 Flag question The "created_at" column contains the timestamp of each tweet

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Question 3 Not complete Mark 0.00 out of 5.00 Flag question The "created_at" column contains the timestamp of each tweet

Post by answerhappygod »

Question 3 Not Complete Mark 0 00 Out Of 5 00 Flag Question The Created At Column Contains The Timestamp Of Each Tweet 1
Question 3 Not Complete Mark 0 00 Out Of 5 00 Flag Question The Created At Column Contains The Timestamp Of Each Tweet 1 (126.59 KiB) Viewed 29 times
Question 3 Not complete Mark 0.00 out of 5.00 Flag question The "created_at" column contains the timestamp of each tweet the row is referring to, but its current format is not ideal for comparing which one is earlier or older (why?). To change this, we are going to reformat the column (but still Unicode of length 30 after conversion). Write a function converting_timestamps (array) that converts the original timestamp format into a new format as follows: Current format : [day] [month] [day value] [hour]:[minute]:[second] [time zone difference] [year] New format : [year]-[month value]-[day value] [hour]: [minute]:[second] For example, a current format value: Tue Feb 04 17:04:01 +0000 2020 will be converted to: 2020-02-04 17:04:01 Note: The input to this function will be the "created_at" column. The return value should thus be in a form that can replace this column. For example: Test Result 020-02-29 13:32:59 data= unstructured_to_structured (load_metrics ("covid_sentiment_metrics.csv"), [0, 1, 7, 8]) data[:]['created_at'] = converting_timestamps (data[:] ['created_at']) print (data[:]['created_at'][0]) <U19 data = unstructured_to_structured (load_metrics ("covid_sentiment_metrics.csv"), [0, 1, 7, 8]) data[:]['created_at'] = converting_timestamps (data[:] ['created_at']) print (data[:]['created_at'][0].dtype)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply