Im reading data from a csv file, here a snippet of the output.
['movie_title', 'director_name', 'duration', 'gross', 'genres', 'actor_1_name', 'actor_2_name', 'actor_3_name', 'facenumber_in_poster', 'plot_keywords', 'language', 'country', 'content_rating', 'budget', 'title_year', 'imdb_score', 'movie_facebook_likes,AvatarÂ\xa0', 'James Cameron', '178', '760505847', 'Action|Adventure|Fantasy|Sci-Fi', 'CCH Pounder', 'Joel David Moore', 'Wes Studi']
There is the '\n'
that im trying to get rid of and the 'Â\xa0'
in every one of the movie titles, heres what ive tried with the failed output.
split2 = [elem.replace('\n', ',') for elem in split2]
with output 'movie_facebook_likes,AvatarÂ\xa0'
, which successfully gets rid of \n
but now the list qoutations are messed up.
split2 = [elem.replace('\n', "','") for elem in split2]
with output
"movie_facebook_likes','AvatarÂ\xa0"
,
fixes the last problem but now the wrong type of quotations are there, does anyone have a suggestion, im honestly stumped. Im just trying to get \n
out of the way then i can work on Â\xa0
later.