Python Movie Data analysis

Source: Internet
Author: User

Data Description:movielens DataSet, which contains 100K movie scores from 943 users and a select 1682 movies . score at least 20 movies per user, data type User ID | item ID | rating | timestamp.

Address: https://grouplens.org/datasets/movielens/

1. Introduction of Pandas,numpy Package

2, read the data: First, if the file is not in the default path, you need to change the path, using the following two lines of command, in addition to pay attention to the application of forward and reverse slashes.

OS.GETCWD ()

Os.chdir ("New Path")

3, because the data contains the scoring data, user data, but in two files, so need to merge. First, use header=[' l column name 1 ', ' Column Name 2 ' ... Format to add a column name to two files

Then the data is merged

Results:

Convert a file to a dictionary type and read two columns by column name

Python Movie Data analysis

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.