Unformatted text preview:

Python Pandas Tutorial Part 1 Getting Started with Data Analysis Installation and Loading Data Pandas is a data analysis library that allows us to easily read in and work with different types of data This can be used to analyze CSV files Excel files and other similar formats In this tutorial we will go over how to install pandas and how to download the data that we ll be using for most of this series While I was hesitant to use Jupiter notebooks because some people find it difficult to get the hang of we will be installing Jupiter Lab To install Jupiter Lab use the following command pip install jupyterlab Once installed I will not go into a deep dive on how to use Jupiter in this series as it will mainly focus on pandas However if you d like a detailed overview of how to use Jupiter check out this video tutorial linked in the description section below After running the installation command a server will start up on your machine which may take a moment You will need to leave the terminal open while you re working in Jupiter Jupiter runs in the browser so if you shut down this server you won t be able to access our notebook In this tutorial we will cover how to load CSV data and analyze it using Python s Pandas library The data is in CSV format and we can load it into a data frame using the following command df pd read csv data csv A data frame is a 2 dimensional labeled data structure and we will learn all about them here If you are not using Jupyter you can still print out the data frame information using print df but it won t look as interactive as it does in Jupyter By default Jupyter displays 20 columns from our data frame but we can see more with the pd options display max columns attribute There are also other attributes and methods that we can use to get an idea of what our data looks like Number of rows 88 883 Number of columns 85 List of column names Data types of each column We will cover data types in a future tutorial In a future video we will learn about filtering data frames and how to grab a specific row based on a certain value in a column We currently have all 85 rows of the question text visible If you want to understand the meaning of any of these columns refer to the question text For instance the question was Are you the IT support person for your family There are different methods to view a specific number of rows which will likely be handy to ensure that your filters and data frames are working correctly To view the first five rows instead of doing a df we use df head To view the last ten rows instead of the first rows we use df tail In the next video we will cover more about data frames as well as learn about the series data type If you have any questions about the upcoming video leave a comment and I ll do my best to answer them

View Full Document


Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...

Join to view PANDAS TUTORIAL and access 3M+ class-specific study document.

We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view PANDAS TUTORIAL 2 2 and access 3M+ class-specific study document.


By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?