import pandas as pd if __name__ == '__main__': # 读取文件 : csv - , student_s1 = pd.read_csv("C:/Users/18124/Desktop/pandas/022_读取CSV_TSV_TXT文件中的数据/Students.csv", index_col="ID") print(student_s1) # 读取文件 : tsv - Tab student_s2 = pd.read_csv("C:/Users/18124/Desktop/pandas/022_读取CSV_TSV_TXT文件中的数据/Students.tsv", sep=" ",index_col="ID") print(student_s2) # 读取文件 : txt - | student_s3 = pd.read_csv("C:/Users/18124/Desktop/pandas/022_读取CSV_TSV_TXT文件中的数据/Students.txt", sep="|",index_col="ID") print(student_s3)