if __name__ == '__main__':
n = int(input())
student_marks = {}
for _ in range(n):
name, *line = input().split()
scores = list(map(float, line))
student_marks[name] = scores
query_name = input()
Run Code Online (Sandbox Code Playgroud)
有人可以*在上面的Python代码段中解释的用法吗?
df.shape #we check the shape of dataset
(1338, 7)
Run Code Online (Sandbox Code Playgroud)
在调用上述形状函数时,我们没有使用 (),但对于大多数其他函数,我们使用 ()。这是为什么?
df.info()# gives the info of the dataset
Run Code Online (Sandbox Code Playgroud)