Im having A LOT of difficulty. I have an assignment which is to modify this file https://easyupload.io/axktqq through Python into CSV cp1252 (Excel) with ";" as the column separator. Im not allowed to use import csv. As you can see, this file is a list of movies with their year, duration, rating, description, etc. all these need to be into their own column (column labels in french) and one film per line.
Title and restriction needs to be in the title() format, the year/duration/nbvotes/metascore into int(eger), the revenue/score into float, and the description into title() with no space before/after the text.
Here is what I did so far (basically nothing):
Title and restriction needs to be in the title() format, the year/duration/nbvotes/metascore into int(eger), the revenue/score into float, and the description into title() with no space before/after the text.
Here is what I did so far (basically nothing):
f = open("data_groupe_11-12_B.txt", 'r') texte = f.read() f.close() lines = texte.split('&') data = [] data.append(lines[0].split(',') + ['Titre'] + ['Année'] + ['Durée (min)'] + ['Revenu (M$)'] + ['Nombre de votes'] + ['Score'] + ['Metascore'] + ['Restriction'] + ['Description'])Can you please help me? :(
Larz60+ write Dec-13-2022, 06:47 PM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Fixed for you this time. Please use BBCode tags on future posts.
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Fixed for you this time. Please use BBCode tags on future posts.