{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "### Lab 6\n", "\n", "The file https://github.com/masterfloss/datamovies/raw/main/moviesPT1.xlsx stores the total number of movies exhibited in Portugal. Each movie may be have several exhibition year. Total exhibition year multiplied by the number of films is in the column 'ANO EXIBIÇÃO'. Each movie has one release date.\n", "\n", "1. Read and import data to a dataframe called df\n", "2. verify the type of data stored in each column\n", "3. If 'REC BRUTA' is the total income for each \n", "4. Create a column withe the income by specator by year of exhibition of a movie \n", "5. Create a column withe the income by exhibition session by year of exhibition of a movie \n", "6. Select the movies directed by Alfred Hitchcock.\n", "\n", "\n", "* df=pd.read_excel(file)\n", "\n", "* df.groupby('CoumnGroup').agg({'ColumnCalculated': 'avg'})\n", "\n", "* df[df['column used in criteria']=='value expeted']\n", "\n", "* titanic[(titanic[\"Pclass\"] == 2) | (titanic[\"Pclass\"] == 3)]\n", "\n", "* more sugestions: https://pandas.pydata.org/docs/getting_started/intro_tutorials/03_subset_data.html" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "\n" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.7" } }, "nbformat": 4, "nbformat_minor": 4 }