Netflix analisis with help of OpenAI
Created by Darío López Díaz. Work in progress..
In this notebook, we use chatgpt 3.5 to analize data from a netflix titles dataframe. The idea is to give prompts to chatgpt directly from python and directly apply the response of chatgpt in order to compute different interesting things.
We define the get_ completition function, with the variables defined by, model: gpt-3.5-turbo and temperature=0 that defines at the minimum, the level of randomness (level of "creativity") of the model. In this way the results provided from the model are more exact.
Number of shows by country / countries.
We ask to ChatGPT to do the same, it will create the program and also implement it in Python. From chatGPT we ask to compute the number of shows by country / countries.
So, in this way ChatGPT can do almost everything. It will write and apply the program in Python. For example, to show what is the most repeated actor in the data and show some information about the actor.
Now the most repeated director in the data.
We ask to GPT to do some plots, for example: a pie plot with the percentage of type of shows.
Next, we plot the number of shows by year, from 1990.
The maximum of shows is at 2019. Obviously, the Pandemic affected the productions of shows since 2019.