The code above reads in several CSV files and saves them as Excel files

The commented out lines at the end of each block of code are used to save the data as Excel files

import pandas as pd

reading in phoible_Features_Fonetikode.csv

phoible = pd.read_csv('D:/pub/工作相关/国社科项目/articulationFromPhoibleRuhlen/phoible_Features_Fonetikode.csv', sep=r'\t(?=(?:[^"]"[^"]")[^"]$)', dtype=str, engine='python')

reading in Ruhlen_Features_Fonetikode.csv

Ruhlen = pd.read_csv('D:/pub/工作相关/国社科项目/articulationFromPhoibleRuhlen/Ruhlen_Features_Fonetikode.csv', sep=r'\t(?=(?:[^"]"[^"]")[^"]$)', dtype=str, engine='python')

reading in phoible-phonemes.tsv

phoible_phonemes = pd.read_csv('D:/pub/工作相关/国社科项目/articulationFromPhoibleRuhlen/phoible-phonemes.tsv', sep=r'\t(?=(?:[^"]"[^"]")[^"]$)', dtype=str, engine='python')

reading in phoible-segments-features.tsv

phoible_segments = pd.read_csv('D:/pub/工作相关/国社科项目/articulationFromPhoibleRuhlen/phoible-segments-features.tsv', sep=r'\t(?=(?:[^"]"[^"]")[^"]$)', dtype=str, engine='python')

saving phoible_Features_Fonetikode.csv as Excel file

phoible.to_excel('D:/pub/工作相关/国社科项目/articulationFromPhoibleRuhlen/phoible_Features_Fonetikode.xlsx', index=False)

saving Ruhlen_Features_Fonetikode.csv as Excel file

Ruhlen.to_excel('D:/pub/工作相关/国社科项目/articulationFromPhoibleRuhlen/Ruhlen_Features_Fonetikode.xlsx', index=False)

saving phoible-phonemes.tsv as Excel file

phoible_phonemes.to_excel('D:/pub/工作相关/国社科项目/articulationFromPhoibleRuhlen/phoible-phonemes.xlsx', index=False)

saving phoible-segments-features.tsv as Excel file

phoible_segments.to_excel('D:/pub/工作相关/国社科项目/articulationFromPhoibleRuhlen/phoible-segments-features.xlsx', index=False)

# phoible = pdread_csvDpub工作相关国社科项目articulationFromPhoibleRuhlenphoible_Features_Fonetikodecsv sep=rt=^^^$ dtype=str engine=python # Ruhlen = pdread_csvDpub工作相关国社科项目articulationFromPhoibleRuhlenRuhlen

原文地址: https://www.cveoy.top/t/topic/bM2z 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录