Exam 1 Flashcards
Dataframes is tabular data with built-in functions (True or False)
True
Integer
whole number
Float
has decimal
Boolean
True or False
String
in quotations
df.head()
df.describe()
After running those exact lines in a cell, the output of the cell will show the first 5 rows of the dataframe, followed by the statistics of the numeric columns. (True or False)
False
type(a)
type(b)
type(c)
type(d)
The exact lines of code above are executed in a code cell after a, b, c, and d are created. The output in the cell will be the data types of a, b, c, and d. (True or False)
False
a = 3
b = 9
a = b / a
print(a)
The output displays:
3.0
(True or False)
True
def my_average(num1, num2, num3):
avg = (num1 + num2 + num3) / 3 return avg
avg_ret = my_average(1, 3, 2)
What is the data type of avg_ret?
Float
If we wanted to replace all NaNs with a known value, we would use which function?
Mean