Pandas read the file path tips

Conventional way, we get the path, F from your file browser address bar: \ test

Then click on the file twice (not double-click) can obtain the file name, test_data.csv

Now it can be spliced ​​into a complete path F: \ test \ test_data.csv, need to add, need to use quotation marks

Now introduces a quick way, ctrl + right click and select Copy as path, you can directly copy the full path to

"F: \ test \ test_data.csv"
when used to read_csv other methods, plus r can be eaten directly, pd.read_csv (r "F: \ test_data.csv" )

Guess you like

Origin www.cnblogs.com/linxingyi/p/10949732.html