Okay, since you're a noob coder, I'll explain it to you in a simple way that doesn't actually require any libraries. Also I'm going to assume you are using movie title and move name interchangeably.
First, you can transform an excel file into a .csv
, which stands for comma separated file (via excel, just save as, select csv. You can do it via google sheets too). What is a csv file? It's like the excel file except every row is on a line by itself and different columns are separated by commas. So the first three lines in your csv would be:
movieId,title,genres
1,Toy Story (1995),Adventure|Animation|Children|Comedy|Fantasy
2,Jumanji (1995),Adventure|Children|Fantasy
Now, the .csv can be read as a regular file. You should read them in line by line. Here is the python doc for that. It's pretty straight forward.
Now that you have every line as a string, we can split them via the string.split()
command. We need to split using the comma as a delimiter since it's a comma separated file. So far our code is something like this (I assume you read the different lines of the csv into the lines
arrays):
lines = [...] # a list of strings which are the different lines of the csv
name_im_looking_for = "move you like" # the movie you're looking for
for(l in lines):
columns = l.split(',')
id = columns[0]
name = columns[1]
if(name.find(name_im_looking_for) != -1):
# this means the name you're looking for is within the 'name' col
print "id is", id, "and full name is", name
This is just a crude way to do it, but if you're really new to programming should help you get on your way! If you have any questions, feel free to ask (and if you're actually good and you just want to know how to use openpyxl, please specify so in your question).