Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pandas.errors.EmptyDataError: No columns to parse from file #18

Open
fishfree opened this issue Dec 22, 2023 · 0 comments
Open

pandas.errors.EmptyDataError: No columns to parse from file #18

fishfree opened this issue Dec 22, 2023 · 0 comments

Comments

@fishfree
Copy link

The console log is as below:

(knowledge-graph) mememe@ubuntugpu:~/knowledge_graph$ python extract_graph.py
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:05<00:00,  5.83s/it]
Number of chunks =  23
An extensive literature search was performed, and 56 articles published in peer-reviewed journals between 2005 and 2021 were selected and analyzed. The corresponding authors' experiential knowledge served as the foundation for the analysis.
(23, 3)
Traceback (most recent call last):
  File "/home/mememe/knowledge_graph/extract_graph.py", line 83, in <module>
    dfg1 = pd.read_csv(outputdirectory/"graph.csv", sep="|")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mememe/.conda/envs/knowledge-graph/lib/python3.11/site-packages/pandas/io/parsers/readers.py", line 948, in read_csv
    return _read(filepath_or_buffer, kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mememe/.conda/envs/knowledge-graph/lib/python3.11/site-packages/pandas/io/parsers/readers.py", line 611, in _read
    parser = TextFileReader(filepath_or_buffer, **kwds)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mememe/.conda/envs/knowledge-graph/lib/python3.11/site-packages/pandas/io/parsers/readers.py", line 1448, in __init__
    self._engine = self._make_engine(f, self.engine)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mememe/.conda/envs/knowledge-graph/lib/python3.11/site-packages/pandas/io/parsers/readers.py", line 1723, in _make_engine
    return mapping[engine](f, **self.options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mememe/.conda/envs/knowledge-graph/lib/python3.11/site-packages/pandas/io/parsers/c_parser_wrapper.py", line 93, in __init__
    self._reader = parsers.TextReader(src, **kwds)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "parsers.pyx", line 586, in pandas._libs.parsers.TextReader.__cinit__
pandas.errors.EmptyDataError: No columns to parse from file

I also checked the data_output/cureus/graph.csv, the file is empty. But the indexing process is 100% completed. Cumbersome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant