![]() ![]() HOWEVER when the csv file I try to open is too big (mine has 100.000 raws), it does nothing. This data.csv file can be found in my drive :) then write the result of this "reading" into another file that I named data.csv,.then read it and put that in a variable,.If that is a problem, another solution is. Simply find the folder you want to export in the left-hand sidebar, click the down arrow next to it, and select Download: There is a 2GB limit, so if the sum of filesizes in your folder tree exceeds that, you may run into trouble. First export as csv with pandas (named this one data_tmp.csv), Google Drive does export sub-folders, but only when they have content. ![]() With open('/content/drive/MyDrive/Datatourisme/tests_automatisation/data.csv', 'w', newline='') as csvfile: With open('/content/drive/MyDrive/Datatourisme/tests_automatisation/data_tmp.csv') as f: With open('file_path/data.csv', 'w', newline='') as csvfile: I have also tried this which creates a visible file named data.csv but i only contains the file path import csv I have tried everything I could find online and I am running out of ideas! HOWEVER, when I actually go on my Google Drive, I can never find it! but I need a code to save it to my drive because I want the user to be able to just run all cells and find the csv file in the drive. I can also read this csv file as a dataframe with pandas in the same colab. It seems to save it where I want, it's on the left panel in my colab, where you can see all your files from all your directories. However, when I do: df.to_csv("file_path\data.csv") My drive is mounted, I was able to save a zip file and other kinds of files to my drive. I need to transform a pandas dataframe to a csv file and save it in google drive. ![]() So, this problem seems very simple but apparently is not. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |