From the course: Advanced Python in Excel: Machine Learning
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Data manipulation with pandas
From the course: Advanced Python in Excel: Machine Learning
Data manipulation with pandas
- [Instructor] As I have mentioned before, pandas is a very powerful Python library for data manipulation and analysis, widely used in finance for its robust functionalities. You'll typically start by importing pandas and loading your dataset into a DataFrame. This dataset might include financial data such as stock prices, sales figures, or economic indicators. One technique that you can use in pandas is handling missing data. In this case, we are filling missing values using the fill forward method. As you can see, the dataset in the left had some missing values, but then the new dataset have already filled those blanks. Data transformation is another key skill that you can use with pandas. In this case, we're creating a new column called Log Sales Figures and also Price Change, which is the difference between the current and the previous stock price in this case. Finally, we can group and aggregate data as well. For this, you can use the function, group by, in order to segment your…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.