Skip to content
CBT Nuggets
DemoBook a Demo

Installation and Setup

This skill covers the setup and use of essential tools for Python data manipulation, including Pandas, Jupyter Notebook, Anaconda, and Conda environments. Learners will understand how to install and configure these tools, create isolated environments for projects, and utilize Pandas for data analysis and visualization. The course also highlights the differences between Jupyter Notebook and other IDEs like Visual Studio Code, emphasizing the iterative and interactive nature of Jupyter Notebook for data science tasks.

Full skill from Python and Pandas for Data Manipulation Online Training. Preview the training IT teams trust.

Updated

53m

Skill 1 of 20 in Python and Pandas for Data Manipulation Online Training

What you'll learn

  • Explain how pandas takes a programmatic approach to data analysis compared with a graphical spreadsheet tool like Excel
  • Describe a pandas Series as a single column and a DataFrame as two or more Series combined into rows and columns
  • Explain how Jupyter Notebook runs as a server in the browser and uses code cells to produce Series, DataFrame, or chart output
  • Install Anaconda as the Python distribution that supplies the packages and libraries needed for pandas work
  • Create and activate an isolated Conda environment, then launch Jupyter Notebook from it to avoid package version conflicts
  • Use conda env list, conda list, and conda install --help to check environments, review installed packages, and read built-in command help

Free 53-minute video lesson with a full transcript and knowledge checks. No account needed to watch.

Introduction

In this set of videos, you’ll learn what Pandas, Jupyter notebook, Conda, and Anaconda are and how to use them to set up your development environment. Let’s unpack what you're going to learn, one by one.

What is pandas?

From the python website, “pandas is a fast, powerful, flexible and easy to use open-source data analysis and manipulation tool, built on top of the Python programming language.”

In the following video, you’ll learn about the Jupyter notebook, which is also free and open-source and the de facto development environment for pandas. See you there.

What is Jupyter Notebook?

According to the Jupyter.org website, Jupyter notebook “is the original web application for creating and sharing computational documents. It offers a simple, streamlined, document-centric experience.”

As you can see, it can support many languages, is shareable, and works with big data(unlike Excel). But, again, it is free and open source.

So how do you install Jupyter notebook? Well, it’s not as simple as downloading a file and installing it. First, you will need Anaconda, a Python distribution for data science that includes all the libraries you’ll need to get started. See you in the next video!

Anaconda Installation

Watch the video and download the course files from GitHub when you are ready. Use the following link: https://github.com/cbtn-data-science-ml/python-pandas-for-data-manipulation

Conda Environments

Be sure to download the Conda Cheat Sheet if you need a resource to help you with the basic commands: Conda Cheat Sheet

Challenge

Open the terminal or Anaconda prompt and navigate to your project directory of choice for this course. Then, activate the conda environment for this course.

Knowledge Check

How do you activate a conda environment?

Knowledge Check

How do you launch Jupyter notebook?

Knowledge Check

How do you deactivate a conda environment?

Knowledge Check

True or False: Pandas has documentation.

Knowledge Check

True or False: Pandas offers a GUI (graphical user interface) like Excel and Google Sheets.

Knowledge Check

True or False: Pandas is open-source.

Challenge Question Answers (optional)

Supplemental Files

View Transcript

Introduction

0:07Hello and welcome. My name is Jonathan Barrios and I'm excited to be your trainer for the Python and Pandas Data Manipulation course. In this set of videos, we're going to talk about pandas, Jupyter notebook, Anaconda, and Conda, with an aim of setting up our development environment for the rest of the course. Let's take a look at each one of these one-by-one. So this is pandas, and this is a pandas documentation. It actually has really great documentation. And this is what pandas sort of looks like.

0:38Here are some examples. And it's not like Excel that uses a graphical user interface. It's a programmatic approach to data analysis. So this is pandas, but you can't really download it right away using an installer or something like that. So let's take a look at the IDE, or the integrated development environment we're gonna use, Jupyter Notebook. This is Jupyter Notebook. And so what is Jupyter Notebook? Well, I said that it was an IDE, which is an integrated development environment.

1:12It's also called a interactive notebook. And Jupyter notebook, according to the website, is the original web application for creating and sharing computational documents. It's simple, streamlined, and document-centric. So what does that mean? Well, here you can see that you have a text cell with some text, some different formatting. And this is using markdown. You can also use LaTech, or LaTeX to write formulas. And this is the code cell where you would write your code, and it would generate an output of either a series or a data frame, which is basically like a spreadsheet or some sort of numbers, or in this case a visualization.

1:57And Anaconda is the Python distribution that we're gonna use to get you up and running with the packages and libraries that you'll need. And we'll use Conda to create environments, or also known as Conda environments. This might be a little bit tricky to understand without actually doing it. So my explanation is pretty straightforward. When you're creating a project, you're gonna need packages and dependencies, and they may be different versions from another project, and another project, and so on. You don't want to have all of your projects using multiple versions, and have all of them mixed together, 'cause that'll cause conflicts.

2:33And it's also not very shareable. So Conda is included with Anaconda, and easily allows us to create Conda environments to make our packet or keep our projects separated and isolated. And this is a best practice for whenever you're doing data analysis and for sharing your work. You can also create a YAML file, or environment.YAML file, that you can easily send to somebody, and they can spin up the same exact environment that you're using so that they have the same experience.

3:03I hope you're excited. I know that I am. And I hope this has been informative and I'd like to thank you for viewing.

What is pandas?

0:07Hello and welcome back. In this video, we're gonna talk about "What is Pandas?" So let's take a look. So you already know that Pandas is a fast, powerful, and flexible and easy-to-use open source data analysis and manipulation tool. And you already know that it's built on top of the Python programming language. But I also think it's important to talk about the documentation before we dive into the details about Pandas. For example, this getting started section is pretty cool because it shows you that if you're coming from SQL and you already have some familiarity, you can see the Select, Group By and Join, have equivalents in Pandas.

0:48And also that Excel basically has a lot of similarities and the concepts are transferable even though that the user interface is quite different. And here is the user guide. It's really helpful and has, I guess, there's 10 Minutes to Pandas, which is really great, but anytime that you're working with some sort of a method or attribute, or you have some sort of questions about the parameters, you can just type it in here. So let's say I'm working with a series, which is basically a column, you can just find that here and you can scroll through there.

1:25I think... Okay, so the first one, that's what I'm looking for. You'll be more familiar with these sort of dot notation, but that's the actual series class. So let's take a look at that. And this is great. If you ever want to get rid of these highlights, just take away the the fragment of URL after the question mark or the question mark and after, and then hit enter, and you'll just see the same documentation without all the highlighting. And then it gives you some examples that are really useful. And then we'll dive into the two major objects, which is basically a series and a data frame.

2:01So what is a series and a data frame? A series is basically a column and a data frame is two or more series put together or multiple columns. So just think rows and columns, right? Let me kinda explain that using the spreadsheet, I think this is probably the best way to visualize it and it should make quite a bit of sense. And if it doesn't now, it will when we start to get into Pandas. So this would be considered series. So this is a column. And if you have two or more of these series, well, that would represent something called a data frame.

2:37So it's very similar to a spreadsheet, except that we're not using a graphical user interface like a spreadsheet. But first, let's talk a little bit about the history of spreadsheet programs. This is not a new concept and I like to start here because a lot of people think that Excel was, sort of, the first tool, but actually it wasn't. It was something called VisiCalc. Let's take a look. So VisiCalc actually kind of looks like Pandas. So this is a programmatic version of a spreadsheet, right?

3:10It's not like Excel that we just looked at or Google Sheets. And here you can see that we have these columns and they're kind of glued together, and I would consider that a data frame. And then right here, you have the, sort of, the index. So this, to me, is already, kind of like, like Pandas, but this started in 1979 and it was originally for the Apple II computer. So it's been around for a while. However, if you scroll down here, you'll see that the first program, spreadsheet programs were actually in 1961.

3:45So Pandas, in my opinion, the concept has been around for a a long time and there's always been a need for business to use spreadsheets. And so it's not Excel, the graphical user interface, that was the first one. That's just the de facto tool for businesses because it's visual and it doesn't require a lot of training and it became very, very popular. But I just wanted to show you that this is not a new concept. It comes from 1961. So let's dive into a little bit more about Pandas.

4:19So this is Pandas inside of Jupyter Notebook. So I just wanted to give you a little bit of a tour of the final project, which is "Visualizing Cryptocurrency." It's like a cryptocurrency portfolio, and I think this will give you a better idea of what Pandas is. Let's take a look. So in this very top section, we'll go over this in the course, but I just wanna show you that first you import your libraries and here, without having to do any web scraping at all, you're pulling information from the Internet, and in this case, what we're doing is going to Yahoo Finance and grabbing Bitcoin prices in real time.

4:58And if you look, it's just one line of code. If you know how to web scrape, you know that this is pretty awesome because you need to know HTML with web scraping and you have to write, sometimes, some functions, and you know, this is a lot more, sort of, work involved. With Pandas, you can use this data reader method here and it pulls that information. So I think it's really cool. So really something to look forward to at the very, very end. But let's keep on taking a look at this notebook to see what Pandas is like.

5:31So on top of that, well here is the data frame that I was talking about in the series. So this is our index, right? So instead of having numbers, we're using dates because we're working with cryptocurrencies. Same thing if you were working with stocks. And again, you can actually change the stock ticker here to something like, you know, Microsoft or something and it would work the same. So it's pretty cool. You can do cryptocurrencies or stocks. So this is a series right here and there's another series.

6:02And as you can see, we have a bunch of series and that collection of series represents a data frame. And so this is much like Excel or Google Sheets, but it's inside of Jupyter Notebook being powered by Pandas. You can also use Matplotlib, which we'll talk about, to visualize data. And so let's take a look at some of the visualizations, and at the very end, I'm gonna show you a moving average and kind of explain a little bit about that. So we have different ways of visualizing and they're called plots. We're plotting here, and these are the opening, the high and opening and closing prices.

6:38This is the opening, closing, and adjusted closing price. And you're plotting more than one column in this case. Here, you're plotting the volume. And here, we have the moving average. So what's happening here? So we're taking 10, 20, and 50-day periods and smoothing out that line. So what does that mean? Well, let's take a look at this output. This is our data frame with all of the real time information from Yahoo Finance.

7:09And this is a visualization. And what it's doing is that normally, you would see a lot of this up and down, sort of, behavior and, sort of, stock ticker, right? And cryptocurrencies, especially, do stuff like this, right? But what we're doing here with the moving average is smoothing that line out. And that's why we have these different lines. And you can see here we have a legend that shows you the 10, 20, and 50 days. And this is helpful to know when the prices are going up and when the prices are going down. Clearly it's going up and then it's going down.

7:42You can see here this is a low point and this is very useful when you're trying to manage a stock portfolio and trying to decide about purchasing and so on. So I just wanted to give you a little bit preview and I think this is a nice explanation about what Pandas is. In the next video, we'll dive into Jupyter Notebook because we really can't use Pandas without some sort of a integrated development environment. You could use Visual Studio Code, but interactive notebooks such as Jupyter Notebook, which is a, or IDE, is really, probably, the most popular tool and that's what we were looking at just now.

8:21So without further ado, I will see you in the next video and I hope this has been informative and I'd like to thank you for viewing.

What is Jupyter Notebook?

0:07In this video, we'll talk about Jupyter Notebook. So we already talked about pandas and what pandas is, but how do you use pandas? Well, you would use some sort of a interactive development environment. But before we talk about Jupyter Notebook, I want to show you Visual Studio Code, which is another option for using pandas, and it's probably the most popular IDE out there. Let's take a look. This is Visual Studio Code. Again, probably one of the most popular IDEs out there right now. And it's popular for, mostly for programmers, I would say, compared to data analysts and data scientists.

0:42But if you're really working more on writing functions and classes and things like that, this is just as good as Jupyter Notebook in many ways, but here's the main difference. What makes this an integrated development environment is that you have a section here with extensions and this bottom part is a terminal that allows you to access, well, it's the terminal command line, and you can run the script from the terminal and you can also install packages. But what's different is that you write a bunch of lines of code, then you write something like app.py, if that's the name of your file, and when you execute that, then you get your output down here.

1:26And the output is not gonna look that great and you can't really visualize things 'cause what it will do is it'll create a popup showing you that visualization, and that's okay. Again, it really just depends on what your needs are. If you're just getting started and you're coming from Excel or from SQL, I think Jupyter Notebook is the way to go. However, you can definitely use Visual Studio Code. So let's check out Jupyter Notebook next.

1:57Okay, so this is Jupyter Notebook, and what's the difference? Well, the main difference here is it's an iterative development environment, right? So that's not the same as IDE, which is integrated development environment, but let me explain what I mean by iterative. So you would write some code and then you execute that code and immediately you get the output. You write some more code, and immediately you get that output, right? So it's all self-contained in this one notebook, right?

2:28So that's why people call it an interactive notebook. Also, what's really great about Visual Studio Code is that you have over 40 languages that you can use. It's super easy to share, and if someone doesn't understand Python, well, they can look at this and kind of get an idea of what's going on, depending on what project you're sharing. For example, we looked at the stock prices or Bitcoin prices from Yahoo Finance, and that was pretty straightforward in that visualization.

2:59Reading the code, if you have comments, makes it a lot more accessible for people who don't know how to write code or Python, right? So that's kind of the main difference between those two integrated development environments. You can also use LaTeX and HTML and images and even videos. So it's an interactive output and it's great for big data. So there's integration with, here it says pandas, scikit-learn, and TensorFlow and Apache Spark, Python, R, Scala.

3:34So it's really pretty amazing, and no wonder it's famous, right? It's got a lot going on. And this is what Jupyter Notebook actually looks like when you get it up and running. And if you wanted to look at something, well, we're looking at the cryptocurrency, this is our project at the very, very end. We could also look at different charts. So here again, we have importing of libraries that we're gonna be using. Here, you can see this is how you use pandas.

4:04You import pandas and the data reader that pulls things from Yahoo Finance, that's how you use that. This is the library that we use for visualization and we'll talk about this little line of code later. So here what we're doing is basically scraping the Yahoo to get some Bitcoin prices in real time. And if we scroll down, you can see that whenever you execute that code, this is the output. So here, this is the iterative part that I was talking about.

4:36You write the code and then you get an output, right? If we keep going, you write the code. In this case, two code cells, and then you get this output. And same thing here, it keeps going, and I think this makes a lot of sense. You write your code here and when you execute that, you get this, right? And so on and so forth. So here are some different forms of visualizations. Not a fan of pie charts, but that's how you would create a pie chart. And again, you can't just install Jupyter Notebook using an installer.

5:07Well, I mean you can if it's the Anaconda installer. And that's what we're gonna use to install Anaconda. So in the next video, we'll talk about Anaconda, and then in the subsequent video, we'll talk about conda environments. I hope this has been informative, and I'd like to thank you for viewing.

Anaconda Installation

0:07Alright, so we're finally gonna get to install our development environment, and that's gonna be with Anaconda. So let's take a look at the Anaconda website and install this. I'm on a Mac, so I'm gonna show you how to install this on a Mac, but I'm also gonna point out how to install this on a Windows operating system and some of the things that you need to look out for so that we're actually using the same tools and then using the same syntax. So let's get started. Okay, so this is the anaconda.com website and we're going to download here.

0:41I could just click on this and be done with it because I'm on a Mac, but I do wanna show you the additional installers. So let's take a look at those. So here we have a Windows option. And what I want to point out here is that you wanna make sure that you're using the right version or the the correct bit. So it's more common for you to have a 64 bit version of Windows installed than a 32 bit. But if you're using a 32 bit version of Windows, then please use that because otherwise you're gonna get a lot of errors.

1:12So that's the first thing to keep in mind. After we install this, I'm gonna point out how you can use the Anaconda prompt. So that's the only other difference. So let's jump into the installation process now. Okay, so we're going to use the graphical installer. And so for Windows, that's the only one that you have available. So you could use the command line installer, but the reason that I'm, I'm not gonna do that, is I think it's a lot easier if you're just starting out to use the installer.

1:45It's the same thing using the installer versus the command line, but I just wanted to point that out. Okay, so let's go ahead and click on the graphical installer and we're gonna go ahead and just download that. I'll close this, and this is pretty for me, it doesn't take very long to get this up and running, but we're gonna run this, I already have this installed, so I'm not gonna go through every prompt, but I will guide you through this process just to make sure that you have it.

2:16So it opened up in another screen for me. So let me drag, drag this over. There we go. Okay, so you'll be guided through the steps necessary to install the software continue. And what's it's talking about here is the modified path options, and it's talking about how it's changing that path and, and also it's talking about everything that is gonna install. So what is it installing? Well, you can see that it's installing a lot of different packages. You saw Anaconda, let's see, we even babble if you're familiar with that. Let's see what else we have here.

2:47We should definitely have, this is good for a optimization for speed. It'll have Conda and that's what we're gonna use for the conda environments. And let's see what else we should have. Pandas, Flask is for web development And ipi I, Python is similar to Jupyter Notebook, but we should have a Jupyter Notebook or maybe it's called Notebook, I think here.

3:19So let's look for that. Map Plot Lib is used for visualization and notebook. There we go. This is actually Jupyter Notebook, so it's, that's, it's just a little bit different syntax there. And then we have Pandas somewhere. There's Pandas. So basically it's a lot of stuff we can keep going. We might find Seaborne, which is another visualization tool. Yep. And there's Seaborne. So you see it really just installs a lot of stuff for you out of the box.

3:50Otherwise you'd have to be sort of installing the package and doing it for each and every one. So this just makes it a lot easier to get started. Okay, so what we're gonna do is just click continue and this is the eula, the end User license agreement. So be sure to read this and then continue when you're done and you accept and agree and then you can decide how you want to install this software. I'm not going to continue, but basically you don't need to install Pie Charm, IDE.

4:22That's another integrated development environment. It's pretty cool. But we don't need that in this case because we're gonna be using Jupyter Notebook. So once you're in, so I'll, I'll say install for me and then you can change the location and then you can say install, which I'm not gonna do. So I'm just gonna go, go ahead and close out of here. Okay, so once you have it installed and you open your terminal, well, before we do that, let's go ahead and download the course files. So these course files are really important for multiple reasons. Here's the first reason. There's gonna be a set of completed files and that will show you all of the correct code that works.

4:59So let's say you're working on something and there you're just having a problem, or you can look at the correct code, you can download that notebook or just open that notebook and try it out and and make a comparison there. The other reason is that there's starter files, so we're gonna start with the same documents and then you fill it in as you progress, and then you'll have all of your Jupyter Notebooks with all of the code that you learned in this course. So it's really a great resource. So let's take a look at the URL so that you can download this as well. So the UL is up here. Let me make this a little bit bigger.

5:39This is really big. Lemme see right here. You should be able to see that. Basically that is github.com, cbt n dash data, dash science dash ml. And it's also linked above this video. So just click on that and then we'll be on the same page. So what we're gonna do here is we're gonna go to, let me, this is a little bit too big, so let me get down to 150. Okay, so we're gonna go to Python pandas for data manipulation, and it's a pin for repository, so it's super easy to find.

6:12And what you wanna do here is one of two things. First, you can go to download zip and then manually add these to your working directory. If you don't have GitHub, if you do have GitHub, then I would recommend Forking this, and that will create a repository in your account and then go ahead and start. So you can get updates as I make any changes as needed. And then what I'm gonna do is just copy this and then head over to the terminal.

6:42Okay, so when you first install Anaconda, you're gonna see that you're in a base environment for Windows users. You want to go to the start menu and type Anaconda, and you're gonna probably see something like Anaconda Prompt. Go ahead and click on that. And that's gonna be your version of the terminal on a Mac, I'm using the terminal. This is what you're looking at for you on a Windows machine. You want to use the Anaconda prompt, and then the syntax is all gonna be the same. So it should work pretty much identically.

7:12So I just wanted to point that out so we have a base environment, but in the next video we're gonna create our environment using conduct. So we're just setting things up right now, so don't worry about this base for now. Okay, so the first thing we want to do is create our working environment. So I'm gonna go to my documents folder, and you can go wherever you would like and create your folder there. So I'm going to go to Documents and say Get Clone and then paste that folder there or that link to get it to clone from GitHub.

7:45But you can also do this manually, right? So you download that zip file, open that zip file, and put it in whichever directory that you wanna have those files in. And then it'll be the same. There's just whatever's more comfortable for you. Okay, so I'm gonna hit enter, and now I'm cloning and I've cloned all of those files. And I'm gonna jump into that folder by typing cd. And then let me spell that correctly. cd, Python, pandas for Data Manipulation.

8:17Cool, I'm in that folder now. And you can see that that change from documents to this folder. And if I use the LS command, I can see what's inside of that. So I want to, I don't want to jump into these and I'll show you why. What we're gonna do now is just type Jupyter Notebook. All right, so let me show you what happened. So right now, there's no command line. I can't type anything because it's running server. This is Jupyter Notebook running a server, and it's in a browser, so it actually runs in a browser.

8:50And that's how Jupyter Notebook works. So let's take a look at the completed and the starter files. So here are the starter files, click on that. If you go to data sets, these are all the data sets that come with that, but they're also inside of each sort of skill. So this is Skill three, Panda series intro, and you can see that these are already there. And that'll make more sense when we start to use these files. So if you go to the first one, there's nothing there because there's no, we are just installing things and there's no Jupyter Notebook yet.

9:24The second one, which is gonna be the next set of videos, that's the first one that has an actual Jupyter Notebook. So let's go ahead and click on this one. Cool. So this is our Jupiter notebook. Let's make sure that we have Python installed. You can see that it says Python Kernel three, and I'm just gonna say print. We'll just do the hello world, the famous hello world to make sure the Python is installed. Okay. And I do shift enter.

9:57That's how you execute these cells. You can also just click on run, but I think using shift enter is actually a better way to do that. Okay, so we have our development environment set up with Anaconda, and in the next video we're gonna talk about Conda environments. And that's the last thing we need to do before we get started, and it's really important to get into that. But once you know how all this works, it's pretty straightforward and it's a best practice to use Anaconda and Conda environments. And once you have Jupyter Notebook up and running with Pandas, it's gonna be a lot of fun.

10:32So I hope this has been informative, and I'd like to thank you for viewing.

Conda Environments

0:07Welcome back. This is the last video of setup for a development environment, and we're gonna dive into conda environments. Alright, so let's take a look at where we left off and we're gonna jump into the Jupyter notebook and take it from there. So this is the Jupyter Notebook, and what I'd like to do is show you this other tab, and you can see that it's, these are our notebooks and this one is green. So what we wanna do is click on this and click shut down. So this notebook is now shut down. So we can just close this tab, say leave, and then you want to quit, click on quit here.

0:44And when you do that, it shuts down the server. So this server was running, and now it's shut down. We'll get into this a lot more in the next set of videos when we get into the Jupyter Notebook set of videos. But for now, I just wanted to show you that, well there was a server and now it's not running anymore. I think this is kind of important to mention because look at all this stuff, it looks kind of wild. So I just want to kind of, sort of explain that. Let's go ahead and use the clear command to clear this up. So if I type clear, we'll get a a little bit nicer looking sort of terminal.

1:18So how do we want to install conda environments? Well, the easiest way is to make sure that we have conda installed first. So let's just say conda --version. Hit that, you get conda 4.1, 4.11. Okay, cool, so we have that set up. Now we want to create our conda environment. So make sure that you're still in your working directory. So this is my working directory that I downloaded from GitHub. And when you're working in the future, you can create any folder and start from there.

1:51But this is where we're working from for now. And what we're gonna do is say conda create --name, and that's gonna be the name of the environment, and I'm just gonna say something like pandas. Pandas CBTN, right? For CBTnuggets. Alright, so if I click enter, oh well, that's a good mistake. I didn't add the a at the end of conda.

2:22And so that's what happened. So let's try that again. Alright, so it's running and it's asking me, "Hey, do you want to proceed?" I'm gonna say, "Yes, I do." And what's cool about this is it's gonna say this is what you need to enter to activate that. So I'm gonna copy that and I'm gonna paste that here. And when I run this, you're gonna see that we went from the base environment to now, to CBTN. Okay? So that's really important. So let me clear this up. And this is how you know that you're in that new conda environment, right?

2:57This is where you want to install things. However, if we start to type Jupyter Notebook, it's not gonna work because we have to install everything that we're gonna use in this project. So it's a clean slate, let's go ahead and add the packages in the libraries that we're going to use. Okay, so first what we wanna do is type, we're gonna type conda install, and we're gonna install pandas, jupyter notebook, jupyter notebook.

3:31And we're gonna install numpy and matplotlib. Okay, let's enter that and see if that'll work. You wanna proceed? Yes, I do. And then this will take a couple minutes to install. Once it's done installing, then we can actually type in Jupyter Notebook again, and that'll open up. And this is your conda environment. When this is done, I'm also gonna show you how to deactivate it and how to look at other, or let's say like you just forget the name of the conda environment, I'm gonna show you how to look that up.

4:07Okay, so here we are. Let me clear all of this up. So I'm gonna say enter clear and I'm going to deactivate this. So I'm gonna say conda deactivate. And then I'm now back at the base environment. But let's say I want to activate it again and I type in conda activate, maybe this has been like I did it, you know, maybe tomorrow, right, or next week, and I just forgot what it was called. I'm like, what did I name it, panda something, right?

4:38Well what you can do here is conda list evns, evns, for environments. Once I enter that, it's gonna show me what I have. Did I do that correctly? No, I didn't. So conda list or is it conda env list?

5:10Yeah, so I just mixed up the syntax, but basically it shows you every project that you have. So I have multiple projects. So this is the one that I usually use, or this is the one that I created and activated. So I'm like, okay, cool, I'll just copy that and I'm gonna say, conda activate. And then you say panda cbtn, and boom, I'm in there. Now, I'm gonna say jupyter notebook and let's see what happens.

5:41Drum roll please. Boom, it works. So what's happening in the background, we have that server running again and Jupyter Notebook is working inside of the browser. And you can go to your starter files and in the next set of videos, this is where gonna start, right here on 2_3 where we're gonna take a tour of the user interface. Okay, so that was a lot of information. The first time that you might hear this, it might be a little overwhelming, or just a lot of, you know, it might be a little bit, the concepts might be a little bit fuzzy, but every time that you work with Python and Pandas and Jupyter Notebooks and conda, you're gonna do this, there's gonna be a startup and a shutdown process, and I'm gonna show you that the next set of videos.

6:26And we're gonna do that every single time. So it's gonna be something that's gonna become very, very natural. The first time you do this, it may, if you have a programing background, no sweat. But if this is something that new to you and you're coming from Excel, this is gonna be something that'll become very familiar and you can always review this video and it's pretty much straightforward. So I hope this has been informative and I'd like to thank you for viewing.

Challenge Question Answers (optional)

0:07Congratulations on making it to the end of this set of videos. In this section, this video is about a challenge and so at some of these, at the end of some of the sections of videos, there may be a challenge. And so I wanna talk to you a little bit about the challenge and kind of go over each one of these. And the reason for that is how about if you get it wrong? I could add a hint inside of the questions, but it's not as effective as me talking about it and showing you explicitly, right, through a video.

0:38And I find that that's a lot more effective. So that's what we're gonna do. Not every end of section will actually have a challenge, but if there is a challenge, there will be a video as well. So it's really important that you go ahead and try to do this on your own. So answer all of the questions. And if you get them wrong, no worries, just keep going. Watch this video and then we'll clear it up and then go back and then revisit the answers that you got wrong. So let's get started. Let's check this out.

1:09Okay, so here is the terminal. So what is the first question? So first of all, we're setting this up. We're saying navigate to your project directory of choice for this course. Well, I'm already there. This is what mine is, right? So that's where I'm gonna be working out of. So that's good. Next it says, open the terminal or add a conda prompt and activate the conda environment for this course. So what do I mean by that? Well, open the terminal. Well, it's already open.

1:39So you have to open the terminal in order to navigate to the directory anyway. So a conda prompt is if you're on Windows. And how do you activate this environment? Well, first of all, I'm going to deactivate 'cause I'm not, let me go ahead and do that first. Okay, so I'm gonna hit clear and we'll start over. Okay, so how do we activate a conda environment? Well, first of all, I think I forgot the name of it, right?

2:11So what's that command? Conda, conda env list. And okay, so mine is Pandas, CBTN, right here. So that's what I'm gonna use. So I'm just gonna copy that and say conda activate. So that's the answer, right? Because I don't know, well activate because I don't know what the name of your command is. So, and there's some also some, you know, some clearly wrong answers in the questions as well. So this is how you activate it.

2:41Let's go ahead and do that. Okay, cool. That is the first question. Second question, how do you launch Jupyter Notebook? Okay, so there's one that's kind of funny, it's not this, right? It's, and it's not even conda. this is a correct answer, right? And if I hit that, then that would actually open Jupyter Notebook and we're not gonna do that. But that is the correct answer.

3:11And the reason I added this is because that's the name of the package, right? So this is what, if you're installing it, that's what it would be. So let's say conda list. And this should show us all of our packages. And if you look here, that's Jupyter Notebook. So that's why I kind of put that there to throw you off. But it's also good, I think a good learning opportunity because that's the name of the package, right? So it's kind of good to know, but the actual command is Jupyter Notebook.

3:42Alright, let's go to the next question. So how do you deactivate a conda environment? Well, first of all, let me clear this up. This is a lot of information, okay? So I can tell that I'm in my, whoops, I'm in my activated conda environment, simply gonna write conda, deactivate. If I hit that, then I'm back into my base environment. And so that's the correct answer. And so what is the next one?

4:12Does pandas have documentation? The answer is true because yes, it does have documentation. It is right here at pandas.pidata.org. Okay, and the next question is, does pandas have a GUI, a graphical user interface like Excel and Google Sheets? And the answer there is no. And the reason for that is that is well, I mean that should be pretty straightforward.

4:44But if it's not, let's go ahead and check out an example of pandas. So let's say we can go to this, I don't know, let's go to the documentation. So I'm gonna click this and I'm just gonna enter, I think, let's say data frame. Alright, so here's a pandas data frame and we'll scroll down and we'll see an example. So Pandas kind of looks like this. So that's not a GUI, graphical user interface.

5:17That's basically a code cell where you type code. So the answer is false. Okay, next question. Is Pandas open source? If you don't know the answer to that, then you can just come here and you can see that it is open source clearly. So the answer for that one is true. But what happens if you're working with pandas and you don't know the answer to something, and maybe I'm not explicitly addressing that in the videos, that could very well be the case because I can't cover everything.

5:52So I'm gonna share something very important with you. And if you're a programmer, have a programming background, you probably probably already know about Stack Overflow, but if not, this Stack Overflow is your friend. Let me show you what I mean. To get there, all you have to do is come to the pandas documentation, so pandas.piata.org, and you just go to ask a question and it automatically takes you to Stack Overflow.

6:22So I would definitely suggest getting, creating an account here, going to sign up and just having an account because you can ask questions. So let's go ahead and do that together. Maybe we'll do a conda question. Let's see. So this says Pandas here, right? So maybe I can ask a question. I'll just leave it there and I'll say, activate conda environment.

6:53I'm not a robot. Okay, so what happens, let's see, other conda environments do not activate, couldn't import missing dependencies. To be quite honest, this is too easy. (laughing) So what do I mean by that? Well, I think that there's gonna be some things that you want to look for and you'll know where to go for like a cheat sheet or the documentation versus Stack Overflow.

7:24So let me dive into that and kind of give you like a quick rundown of how to do that. So first the answer is right here, right? If you click on this, it's not a great question, but if you click on this you, it was kind of highlighted that you could use that. So if I manually type conda activate pandas, it'll work. Well that kind of sort of works. But I wanna share this with you. This is the conda cheat sheet. And if, how do you find this? Well, it's here in the conda or the docs.conda.io.

7:58And I think if you just type in cheat sheet, we should be able to get that. ♪ Do do do ♪ Is that it? Let's try it. No, but this is pretty cool because it has, I mean you could actually just look through the documentation. Oh there it is. Cheat sheet. I kind of like the cheat sheet because it has everything there and if you click on it, it just downloaded it for me.

8:32So let me just go back to where I had it sort of. I think it was here. One more, there we go. So I already had it opened up, so let's go ahead and zoom into this. There. Alright, so conda info is pretty cool, so let's check that out. So what is conda info? Wow, so a lot of information version, numbers, build, directories, base environment, directories.

9:06Cool, so a lot of information, I think this might be useful, maybe a little bit, not useful right now. So let's check something else out conda update. So you could update that way. You can conda install and then package name. That's what we did when we installed Jupyter Notebook, Pandas, NumPy and Matplotlib. So that's cool. You can update a package as well. And then you can do help. So this is kind of awesome. So conda, let's see what we could do.

9:37Conda update or command name and then help. Let's try that. So let's say you're trying to install, so like conda install --help Scroll all the way up to the top, it's a lot of information. So here's where it begins. So conda install and then here are all of the different commands that you can use. So path, channel, I mean it's a lot of information.

10:10This is sort of like the documentation built into the terminal or the conda prompt. So that's kind of cool. It's a lot of information, but I thought I'd take this opportunity to kinda show you this. And here's conda create, conda env list. Remember we used that one already and we can do conda list. We did that too. And what does conda list do? So let's go ahead and clear this. So we know that conda env list will list the the environments. And what does conda list do? Well it's packages, right?

10:41I was looking to see what Jupyter Notebook is called and that's what I used. There's also seaborne and well there's a lot of 'em here. Why is that? Okay, because I am in my base environment. So this is, I'm glad I made that mistake. If you say conda list, it's gonna show all the packages that you have in your project, but the base environment has all of them. So this is not gonna work. So I'm gonna activate it and then say conda list.

11:11So let's try that out. Okay, so up arrow allows me to go through all the previous commands that I entered. So that's conda, activate pandas_cbtn. Now I'm in my conda environment, so I'm gonna say conda list. Okay, much shorter list, still a lot, but you can see that notebook is here and that's what I did last time. So conda list, really great command, very useful for where we're at right now in our journey with Pandas.

11:46And so what else? Conda env create, we already did that, conda search PACKAGENAME, you can do that. See a list of all packages, well that's a URL. Conda install jupyter. Cool, we already did that. And you might notice that there's slight differences in syntax. I'm able to get it to work without using a dash like jupyter-notebook. I'm able to just say Jupyter Notebook with a space and that works.

12:16So this important to sort of mention that there may be slight variations in syntax. For example, right here it says conda create name. And then once you create that, you say activate in that you don't have to say conda activate. That's interesting. Let's see if that works. So I'm gonna deactivate and I'm gonna just say activate pandas_cbtn.

12:48I gotta spell pandas correctly and that didn't work for me. So let's look at that. So what did, oh that's for Windows. For Linux it says source activate. Okay, well for me it's conda. So let's do source activate. Okay, you could do that. But look, if I, just to make my point, you can actually do this.

13:21Conda activate and it works. So I was able to use source activate pandas and then the name or conda activate pandas, you know CBTN. So either one works. So there's a little bit of slight differences in the syntax, which I think is super interesting. Alright, so that's a lot of great stuff. So I hope this was useful. I hope I answered the questions and a little bit more. Again, the documentation is awesome, it's really helpful. And the conda cheat sheet when you're first getting started, it's a great resource.

13:54So you can download that and it's free and it's on docs.conda.io. So let me share that. Let me just show you that real quick. And I think if you just type cheat sheet here and that's how you would get there. Let's see. Getting started and I think it was right here. Yeah, there it is.

14:24And if you click on that, that's gonna download it. I hope this has been informative and I'd like to thank you for viewing.

Frequently asked questions

What does the pandas Installation and Setup lesson cover?

The lesson explains how pandas takes a programmatic approach to data analysis compared with a graphical tool like Excel, and introduces a Series as a single column and a DataFrame as two or more Series combined into rows and columns. It then walks the learner through installing Anaconda, creating and activating a Conda environment, and launching Jupyter Notebook from it, so the team has a working environment for the rest of the course.

How long is the Installation and Setup lesson, and where does it fit in the Python and Pandas course?

The lesson runs about 53 minutes and is the environment-setup phase of a course that plans for about 18.5 hours per learner. Later lessons build on it, moving from Pandas Series basics into DataFrame cleaning, filtering, grouping, combining, time series, and visualization.

Why use Conda environments instead of installing pandas packages globally?

Different projects can need different package and dependency versions, and mixing them causes conflicts and makes work hard to share. A Conda environment keeps each project isolated, and an environment.yaml file lets a colleague spin up the same exact environment, which the trainer describes as a best practice for data analysis and sharing work.

What Conda commands does a team member practice in this lesson?

The learner uses conda env list to see available environments, conda list to review installed packages, and conda install --help to read the documentation built into the terminal. The lesson also uses conda activate followed by jupyter notebook to start the browser-based notebook server from the activated environment.

Does a learner need programming experience before starting pandas setup?

The course is associate-level and aimed at practitioners with some data science or Python exposure, and the trainer notes that learners with a programming background will find setup straightforward. Analysts coming from Excel will find the concepts transferable, and the startup and shutdown process becomes familiar because it repeats in every session.

How can a Training Manager roll this lesson out to a data analyst team?

Team Leads can assign the course in phases, starting with environment setup in this lesson before moving to core Series and DataFrame work and then reporting-focused topics. CBT Nuggets Playlists and Team Reporting help Training Managers sequence that rollout and track per-learner progress and completion across assigned learners.

What's next?

Ready to keep going?

For your team

Bring this training to your team

See how CBT Nuggets helps IT teams close skills gaps, hit compliance targets, and prove training ROI.

Book a Demo
Just need Python and Pandas for Data Manipulation Online Training?

Learning on your own? Browse individual plans ($49/month, billed annually) →

Not ready to buy?
with no purchase required. Already have an account?
Book a Demo