You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
matching_dependency/set_none.py

28 lines
1.6 KiB

1 year ago
import numpy as np
import pandas as pd
if __name__ == '__main__':
lt = pd.read_csv(r'E:\Data\Research\Projects\matching_dependency\datasets\TMDB-TVDB\tmdb.csv',
encoding='ISO-8859-1', sep=',')
rt = pd.read_csv(r'E:\Data\Research\Projects\matching_dependency\datasets\TMDB-TVDB\tvdb.csv',
encoding='ISO-8859-1', sep=',')
mapping = pd.read_csv(r'E:\Data\Research\Projects\matching_dependency\datasets\TMDB-TVDB\gt.csv',
encoding='ISO-8859-1', sep=',')
# 删除列
# lt.drop(columns=['numberOfSeasons', 'numberOfEpisodes', 'birthDate', 'last_air_date', 'release_year', 'runtime',
# 'genre_list', 'origin_country'], inplace=True)
# rt.drop(columns=['job'], inplace=True)
# 列名调整
# rt = rt.rename(columns={'birthDate': 'birthYear', 'release_year': 'startYear',
# 'last_air_date': 'endYear', 'runtime': 'runtimeMinutes'})
# 列顺序调整
# rt = rt[['id', 'title', 'name', 'episodeNumber', 'seasonNumber', 'birthYear', 'endYear', 'startYear', 'genre_list',
# 'runtimeMinutes']]
# lt.to_csv(r'E:\Data\Research\Projects\matching_dependency\datasets\TMDB-TVDB\tmdb.csv', sep=',', index=False, header=True, quoting=1)
# rt.to_csv(r'E:\Data\Research\Projects\matching_dependency\datasets\TMDB-TVDB\tvdb.csv', sep=',', index=False, header=True, quoting=1)
# mapping.to_csv(r'E:\Data\Research\Projects\matching_dependency\datasets\TMDB-TVDB\gt.csv',
# sep=',', index=False, header=True, quoting=1)
print(1)