Попытка прочитать файл .txt
в моей записной книжке Jupyter.
Это мой код:
acm = pd.read_csv('outputacm.txt', header=None, error_bad_lines=False)
print(acm)
Вот пример моего текстового файла:
2244018
#*OQL[C++]: Extending C++ with an Object Query Capability.
#@José A. Blakeley
#year1995
#confModern Database Systems
#citation14
#index0
#arnetid2
#*Transaction Management in Multidatabase Systems.
#@Yuri Breitbart,Hector Garcia-Molina,Abraham Silberschatz
#year1995
#confModern Database Systems
#citation22
#index1
#arnetid3
#*Overview of the ADDS System.
#@Yuri Breitbart,Tom C. Reyes
#year1995
#confModern Database Systems
#citation-1
#index2
#arnetid4
И различные символы должны соответствовать:
#* --- paperTitle
#@ --- Authors
#year ---- Year
#conf --- publication venue
#citation --- citation number (both -1 and 0 means none)
#index ---- index id of this paper
#arnetid ---- pid in arnetminer database
#% ---- the id of references of this paper (there are multiple lines, with each indicating a reference)
#! --- Abstract
Не уверен, как настроить это так, чтобы данные читались правильно. В идеале, я хотел бы, чтобы фрейм данных, где каждая категория представляет собой отдельный столбец, а затем все записи в документе являются строками. Спасибо!