Could anyone explain to my why this code rise an error?
import pandas as pd
reviews = pd.read_csv("fandango_scores.csv")
d = [reviews["FILM"], reviews["RT_user_norm"], reviews["Metacritic_user_nom"], reviews["IMDB_norm"], reviews["Fandango_Ratingvalue"], reviews["Fandango_Stars"]]
norm_reviews = pd.DataFrame(data=d).T
Welcome to DQ Community @piotr.jan.fic
At the onset, please refer to this guide Guide: How to Ask a Good Question because your code doesn’t match at all with the topic you have created.
Moving on, not sure what exactly you are trying to achieve here, the first problematic line of code is this:
What I can make of it is you are trying to select a few columns from
reviews and assign it to
d or you are trying to rename the column names.
Please add the context of your query, what you are trying to do, what exactly is the error you are facing, so that we may be able to help you.