0

When trying to open the file it gives me ParserError: Error tokenizing data. C error: Expected 1 fields in line 8, saw 22152

What I tried:

mat = pd.read_csv('/Users/csb/Desktop/Zebrafish_scRNA/sample_Control_WTA_1_RSEC_MolsPerCell.csv', sep = '\t')

Output:

enter image description here

Instead of data points in each separate columns it got all combined

Output I want is:

enter image description here

The first 7 rows of Output dataframe dropped. Want to automate this since there will be several files which comes in that Output format. How can I resolve this issue and automate it to get the output that I want to achieve?

2
  • you should try to change the parse engine as decribe here : stackoverflow.com/questions/60345503/… Commented Jun 27, 2022 at 9:52
  • Use skiprows=7 in the read_csv to drop the first 7 rows Commented Jun 27, 2022 at 10:19

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.