如何使用熊猫读取具有超过5万行的csv文件?
在下面的代码中,我试图在列中查找与最大值相关的整行,但是在打印整个文件时,只显示了很少的内容。
# Find the display name and no. of comments done by the user who has got maximum reputation
import pandas as pd
# getting data and required columns
df = pd.read_csv(
"C:\\Users\\LENOVO\\PycharmProjects\\stack_overflow\\Stack Overflow Project\\Stack Overflow Dataset\\users.csv")
max_reputation = df.loc[df['reputation'].idxmax(axis=2, skipna=True)]
# giving output
print("\33[32;40m<<<::: DATABASE :::>>>\n", df)
print("\33[31;40m<<<::: USER INFO WITH MAX VIEW COUNT :::>>>\n", max_reputation)