Image_search / data /covert.py
Kabila22's picture
image search is done
8c65df5
raw
history blame contribute delete
490 Bytes
import pandas as pd
# Read the TSV file
tsv_file = '/Users/kabilanravi/Downloads/unsplash-research-dataset-lite-latest/photos.tsv000' # Replace with your TSV file path
csv_file = '/Users/kabilanravi/Desktop/image.csv' # Desired output CSV file path
# Load TSV into a DataFrame (tab-separated by default)
df = pd.read_csv(tsv_file, sep='\t')
# Write DataFrame to CSV
df.to_csv(csv_file, index=False) # index=False avoids adding row numbers
print(f"Converted {tsv_file} to {csv_file}")