Home>

df_train = pd.tea. read_csv ("C: \ Code \ Python \ train.csv")
Is there something grammatically wrong with this part?
There is no doubt that there is a .csv file in that location, but when I run it,
Traceback (most recent call last):
File "C: \ Code \ Python \ ML.py", line 6, in
df_train = pd.tea. read_csv ("C: \ Code \ Python \ train.csv")
And there is an error in red.

  • Answer # 1

    "C: \ Code \ Python \ train.csv"of\ tIs a tab.

    \ \All\\Or all/Please try.

    Postscript
    Strings prefixed with r or R are called raw strings and are called raw strings.
    Does not interpret'\'.

    r "C: \ Code \ Python \ train.csv"But that's okay.

  • Answer # 2

    import pandas as pd
    If so,
    df_train = pd.read_csv ("C: \ Code \ Python \ train.csv")
    I think you can read it with.

  • Answer # 3

    df_train = pd.tea. read_csv ("C: \ Code \ Python \ train.csv")


    -Is pd.tea. read_csv an error in pd.read_csv?
    -"C: \ Code \ Python \ train.csv" There is a mysterious half-width space at the beginning.
    After fixing the above two points, how about the following?

    df_train = pd.read_csv ("C: \ Code \ Python \ train.csv")

    * When asking a question, please write the code using thefunction.
    Also, please write the full text without omitting the error text.