You need to use df.to_csv to create tsv files because there isn't a df.to_tsv function in pandas.
1. Mount drive to colab:
from google.colab import drive
drive.mount('/content/drive')
2. Saving file in drive:
review_df.to_csv('/content/drive/My Drive/review_df.tsv', index=False, sep='\t')
Here, review_df is the name of the pandas dataframe you want to save as a tsv file.
review_df.tsv will be the name of the output file.
The tsv file will be saved on the homepage of the drive. You can navigate to a specific folder in the drive as well by editing the path in to_csv function.
Comments
0 comments
Article is closed for comments.