This repository contains solutions to 15 LeetCode questions related to Pandas. It is aimed at helping learners understand and master the fundamental operations of the Pandas library by solving practical problems. Each question solution is explained in detail to cover key aspects of Pandas functionality.
- Understand the basic concepts of the Pandas library.
- Learn about DataFrames and Series, which are the core data structures in Pandas.
- Introduction to how to import and use Pandas in your Python code.
- Learn how to read various data formats such as CSV, Excel, and SQL databases using Pandas.
- Understanding how to load and preview data effectively.
- Create DataFrames and Series from various data structures like lists, dictionaries, and numpy arrays.
- Learn to view and inspect DataFrames, including summary statistics, row/column selection, and more.
- Edit DataFrames by adding/removing columns, changing values, or applying functions to entire rows or columns.
- Learn how to filter, sort, and group data based on specific conditions.
- Apply transformations to DataFrames to modify data according to the problem statement.
- Understand how to detect and handle missing or null values in your data.
- Learn strategies like imputation, removal, or filling of NaN values.
- Learn techniques to identify and handle duplicate data, including how to deal with duplicated rows and columns.
- Remove or aggregate duplicates based on different conditions like row index and column names.
- Learn methods to manipulate string data within DataFrames and Series.
- Explore string operations like splitting, replacing, or transforming text data.
- Python 3.x
- Pandas library
- Jupyter Notebook (optional for viewing solutions interactively)
Each solution is contained in a separate Python script within this repository. To run the solutions:
- Open the
.pyfile corresponding to the problem you want to explore. - Execute the code to see the solution in action.
Feel free to fork the repository and submit a pull request with additional improvements, fixes, or new solutions.