Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I have json records in the file json_data. I used pd.DataFrame(json_data) to mak

ID: 3803100 • Letter: I

Question

I have json records in the file json_data. I used pd.DataFrame(json_data) to make a new table, pd_json_data, using these records. This table is shown below.

I want to manipulate pd_json_data to return a new table with primary key (url,hour), and then a column updated that contains a boolean value.

hour is based on the number of checks. For example, if number of checks contains 378 at row 0, the new table should have the numbers 1 through 378 in hour, with True in updated if the number in hour is a number in positive checks.

Any ideas for how I should approach this?

I have json records in the file json_data. I used pd.DataFrame(json_data) to make a new table, pd_json_data, using these records. This table is shown below.

I want to manipulate pd_json_data to return a new table with primary key (url,hour), and then a column updated that contains a boolean value.

hour is based on the number of checks. For example, if number of checks contains 378 at row 0, the new table should have the numbers 1 through 378 in hour, with True in updated if the number in hour is a number in positive checks.

Any ideas for how I should approach this?

number of checks positive checks url 378 135, 134, 155, 157, 177, 204, 314, 315, 319, 3... http://5eg.net/gallery/thumbnails.php?album la... 1 [552, 604, 672] 707 http://a.hatena.ne.jp/yamagen2001/ 11, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14... 418 http://abclocal go.com/wls/story?section News& 3 369 130, 36, 45, 65, 88, 154, 157, 166, 169, 197, http://africa.oneworld.net/article/rssheadline... 4 719 15, 6, 10, 12, 13, 15, 17, 18, 21, 30, 31, 32,... http://barrie.kijiji.ca/c-buy-and-sell-sports-. 5 612 [4, 5, 28, 52, 76, 100, 116, 129, 155, 196, 22... http://bayreuth.eins.de/category/ist/communit... 3665 11, 4, 6, 14, 15, 21, 26, 38, 45, 54, 64, 78, http://bbs.zksh.com/boardstat.asp?boardid 479 7 |261 [4, 7, 9, 10, 13, 14, 33, 34, 79, 81, 100, 101 http://bbs3.ustc.edu.cn/cgibbsqry?userid neww...

Explanation / Answer

creating a new table from the existing table with constraint

create table new_table_name as select[column1, column2,column3...column n] from existing_table_name [where]