109. What will be the last row of the created table when the following code is executed?
Anonymous Quiz
18%
0 95.94 95.89 891700
15%
open close volume
34%
ValueError will appear
33%
1 95.00 95.59 752500
110. What will the column named "index" contain when the following code is executed?
Anonymous Quiz
14%
1 2 1 2
41%
0 1 0 1
38%
0 1 2 3
7%
1 2 3 4
111. What will be printed when the following code is executed?
Anonymous Quiz
32%
95.74
41%
95.0
17%
96
10%
95.5
112. Whose last name will appear at the end of the table after the program is executed?
Anonymous Quiz
28%
Petrov
27%
Error
38%
Ivanov
7%
Romanova
WEAKLY PYTHON MILLIONAIRE DIGEST 14.11-20.11.2022
~ Topic #11 “Pandas”
~ Average accuracy 40%
~ Average involvement 14 people (5%)
N.B.
🐍Mind the syntax of pd.DataFrame() function: if you need to merge several arrays into table, plug in the list of the arrays into the function to avoid errors (e.g. pd,DataFrame([list1,list2], columns = [“first”, “second”])
🐍 pd.reset_index in pandas is used to reset index of the dataframe object to default indexing (0 to number of rows minus 1) or to reset multi level index. By doing so, the original index gets converted to a column “index”. Drop parameter helps to add or not add the old index into dataframe. By default, it adds.
~ Topic #11 “Pandas”
~ Average accuracy 40%
~ Average involvement 14 people (5%)
N.B.
🐍Mind the syntax of pd.DataFrame() function: if you need to merge several arrays into table, plug in the list of the arrays into the function to avoid errors (e.g. pd,DataFrame([list1,list2], columns = [“first”, “second”])
🐍 pd.reset_index in pandas is used to reset index of the dataframe object to default indexing (0 to number of rows minus 1) or to reset multi level index. By doing so, the original index gets converted to a column “index”. Drop parameter helps to add or not add the old index into dataframe. By default, it adds.
116. What will be printed when the following code is executed?
Anonymous Quiz
34%
{'what', 'decide', 'have', 'All'}
41%
{'is', 'to', 'we'}
16%
{'do', 'the', 'that', 'given', 'us'}
9%
{'with', 'time', 'is', 'to'}
117. What will be printed when the following code is executed?
Anonymous Quiz
19%
10
38%
11
21%
12
22%
error
118. What will be printed when the following code is executed?
Anonymous Quiz
23%
10
50%
11
20%
12
7%
error
119. What will be printed when the following code is executed?
Anonymous Quiz
10%
3307.5
42%
3307.549
40%
ValueError
8%
3307.55
120. What will be printed when the following code is executed?
Anonymous Quiz
17%
3307.5
67%
3307.549
15%
ValueError
0%
3307.55
121. What will be the last row of the table when the following code is executed?
Anonymous Quiz
9%
0 1254 Dentist USA 44
27%
1 1435 Actor Canada 27
30%
1 Actor Canada 27
34%
0 Dentist USA 44
WEAKLY PYTHON MILLIONAIRE DIGEST 21.11-27.11.2022
~ Topic #12 “Text files and tables”
~ Average accuracy 33%
~ Average involvement 12 people (4%)
N.B.
🐍Mind the file access modes while working with the files: ‘w’ - write only (open the file for writing, not reading), ‘w+’ - write and read (open the file for BOTH writing and reading), ‘r’ - read only (open file for reading, not writing), ‘r+’ - read and write (open the file for BOTH reading and writing), ‘a’ - append only (open file for writing (appending) only), ‘a+’ - append and read (open the file for BOTH reading and writing(appending))
🐍readlines() function reads all the lines and returns each of them as a string element in a list
~ Topic #12 “Text files and tables”
~ Average accuracy 33%
~ Average involvement 12 people (4%)
N.B.
🐍Mind the file access modes while working with the files: ‘w’ - write only (open the file for writing, not reading), ‘w+’ - write and read (open the file for BOTH writing and reading), ‘r’ - read only (open file for reading, not writing), ‘r+’ - read and write (open the file for BOTH reading and writing), ‘a’ - append only (open file for writing (appending) only), ‘a+’ - append and read (open the file for BOTH reading and writing(appending))
🐍readlines() function reads all the lines and returns each of them as a string element in a list