From the course: Advanced Hands-On Python: Working with Excel and Spreadsheet Data
Introduction to pandas
From the course: Advanced Hands-On Python: Working with Excel and Spreadsheet Data
Introduction to pandas
- [Instructor] If you've ever done any data science work with Python, then you're probably familiar with the pandas library. You can find the documentation for pandas at this link, and I would suggest keeping it open in a browser tab as you work through this chapter in case you want to refer to it or try out some of your own ideas. If I click on the API reference, you can see various parts of the pandas library. pandas is specifically designed for data manipulation and analysis, and one of its core features is a high performance, easy-to-use structure called a data frame. And I'll click on that link here. A data frame is a two-dimensional data table similar to a spreadsheet, but with a lot of extra built-in features, some of which we will see later in this chapter. Now, pandas, as you can see, is a very comprehensive library. It has a lot of features. The API surface is pretty big. And it is well beyond the scope of this course to do a deep dive into all of its features. I'm going to focus in this chapter on reading and writing data, both in CSV and Excel formats, along with some basic data frame operations like exploring and manipulating data. If you want to learn more about pandas, there are several other courses available here in the online library that you can refer to. So, let's make sure that pandas is properly installed on your system. And what I'm going to do is I'm going to do this in Visual Studio Code. So here in VS Code, let's open up the built-in terminal, which is right here, and let's make that full screen. So, I'm going to type the command pip show pandas, and you can see that when I do that, I'm getting some output here in the terminal about the library. Now, if you didn't get a result that looks like this, you might need to install it. So, if you have to install it, type pip install pandas, and you can see that I've already got it installed. So, all the requirements are already satisfied, but if you don't have it, then this will install it onto your computer. So that's all you need to do to get set up for this chapter.