0

Please how do I import a csv file

Please how do I import a csv file in the sololearn python IDE?. I've tried using the read_csv function with the correct file path, but the interpreter keeps throwing an error which makes me wonder if the function isn't supported in the sololearn python IDE. Please does anyone know how to do this or have any information about it?? Thank you.

22nd Mar 2023, 8:40 PM
DevAbdul
DevAbdul - avatar
6 Answers
+ 6
DevAbdul , what you can do to get access to a file in sololearn server is like this description: (see the file with sample code for creating a temporary csv file and how to read from this file. run it to see what the output is.) > to get a csv file and work with it, we need to *write* this file as the first step as shown in the code sample. > each time the code is executed, it creates this temp file that you can work with. > the second step is *reading* now from the csv file and processing and outputting the data. https://code.sololearn.com/c4TU2bKBv3DQ/?ref=app
23rd Mar 2023, 11:43 AM
Lothar
Lothar - avatar
+ 5
The Sololearn python interpreter runs on the Sololearn server in a very limited and constrained environment. It cannot access any files from your phone. If you link your actual code, you might get an even more meaningful and relevant response.
22nd Mar 2023, 9:01 PM
Tibor Santa
Tibor Santa - avatar
+ 2
You could try to upload your csv file somewhere like github and use request library to retrieve the content.
23rd Mar 2023, 6:24 AM
Toni Isotalo
Toni Isotalo - avatar
+ 2
Thank you Lothar and William Mabotja for the help👍👍
24th Mar 2023, 11:13 PM
DevAbdul
DevAbdul - avatar
+ 1
Try transfer.sh
24th Mar 2023, 8:00 PM
William Mabotja
William Mabotja - avatar
0
Toni Isotalo please how do I do that?
23rd Mar 2023, 10:32 AM
DevAbdul
DevAbdul - avatar