File size: 748 Bytes
9b4efa3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import pandas as pd

# list of all the csv files
csv_files = [
    "en-wikihow-qa-dataset-1k.csv",
    "ru-wikihow-qa-dataset-1k.csv",
    "pt-wikihow-qa-dataset-1k.csv",
    "nl-wikihow-qa-dataset-1k.csv",
    "it-wikihow-qa-dataset-1k.csv",
    "fr-wikihow-qa-dataset-1k.csv",
    "es-wikihow-qa-dataset-1k.csv",
    "de-wikihow-qa-dataset-1k.csv"
]

# create an empty dataframe to hold the merged data
merged_data = pd.DataFrame()

# loop through all the csv files, read them into dataframes, and merge them
for file in csv_files:
    data = pd.read_csv(file)
    merged_data = pd.concat([merged_data, data], ignore_index=True)

# write the merged data to a new csv file
merged_data.to_csv("multilingial-wikihow-qa-dataset-8k.csv", index=False)