Avatar ·

Error: pandas.errors.ParserError: Error tokenizing data. C error: Expected 1 fields in line 5, saw 9

📁 Advanced Python Topics, python3, pandas

Trying to load a tsv file into pandas.

import pandas as pddf = pd.read_csv(filename, sep='\\t')print(df)

After executing this code, I see an error in the console

df = pd.read_csv(filename, sep='\\t') File ""/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pandas/io/parsers.py"", line 655, in parser_fretu _read(filepath_or_buffer, kwds) File ""/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pandas/io/parser
Avatar ·

PostgreSQL has the psql application. But it's important to note that logging into the database is done (by default) with the same user as the one you are logged into the system with. PostgreSQL creates the postgres user (system user) during installation. All actions must be performed under this account. So, first, switch to the postgres user

sudo su postgres

and run psql under it. Then the PostgreSQL command prompt will appear. It's worth mentioning that in PostgreSQL, the postgres user is something like a superuser, i.e., it has access to all databases, and by default, all databases are created from it. There is also a small set of administration commands, for example, \\l

Log in to leave an answer

Blogs