Page 1 of 1

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

Posted: Tue May 24, 2022 8:04 am
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 30 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)