"SettingWithCopyWarning" with pandas read_csv()

Viewed 54
Test 1.1.2
C:\Users\742093\AppData\Roaming\Python\Python36\site-packages\pandas\core\indexing.py:670: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  iloc._setitem_with_indexer(indexer, value)
Test 1.1.3
    print("Test 1.1.2")
    df = pd.read_csv( r''+file+'', sep=";", engine='python'  ) #open the file and read
    print("Test 1.1.3")

As you can see the warning appears right at the read_csv-line. But I have no clue what this warning means in my case or how to fix it. It must have something to do with the data in the file I'm loading (I load other files to with no problem).

0 Answers
Related