The first column is user_id, and the second is the rating for joke 1, and the rest can be done in the same manner. I want to convert the file shown above into the format likes: user_id joke_id rating 1 1 -7.82 1 2 8.79 In addition, after conversion, as the normal ratings are between -10 and +10, the number 99 means the user didn't rate for the corresponding jokes and should be removed.
https://stackoverflow.com/questions/67293628/convert-a-csv-file-into-a-specified-style-with-python-by-jupyter April 28, 2021 at 12:05PM
没有评论:
发表评论