Skip to content

wrighters.io

  • About
  • Articles
    • All Articles
  • Home
  • Privacy Policy
wrighters.io
  • About
  • Articles
    • All Articles
  • Home
  • Privacy Policy

Selection in pandas using query

2 Comments / Pandas, Python / By Matt Wright

The query method in pandas DataFrames provides some flexibility in code, and potential speedups using numexpr.

Selecting in Pandas using where and mask

Leave a Comment / Pandas, Python / By Matt Wright

This is the fifth post in a series on indexing and selecting in pandas. If you are jumping in the middle and want to get caught up, here’s what has been discussed so far: Basic indexing, selecting by label and location Slicing in pandas Selecting by boolean indexing Selecting by callable Once the basics were …

Selecting in Pandas using where and mask Read More »

Indexing and Selecting in Pandas by Callable

2 Comments / Pandas, Python / By Matt Wright

In pandas, you can use callables where indexers are accepted. It turns out that can be handy for a pretty common use case.

Boolean Indexing in Pandas

Leave a Comment / Pandas, Python / By Matt Wright

This is the third post in the series on indexing and selecting data in pandas. If you haven’t read the others yet, see the first post that covers the basics of selecting based on index or relative numerical indexing, and the second post, that talks about slicing. In this post, I’m going to talk about boolean …

Boolean Indexing in Pandas Read More »

Indexing and Selecting in Pandas – slicing

Leave a Comment / Pandas, Python / By Matt Wright

Slicing data in pandas This is second in the series on indexing and selecting data in pandas. If you haven’t read it yet, see the first post that covers the basics of selecting based on index or relative numerical indexing. In this post, I’m going to review slicing, which is a core Python topic, but has …

Indexing and Selecting in Pandas – slicing Read More »

Indexing and Selecting in Pandas (part 1)

5 Comments / Pandas, Python / By Matt Wright

The topic of indexing and selecting data in pandas is core to using pandas, but it can be quite confusing. One reason for that is because over the years pandas has grown organically based on user requests so there are multiple way to select data out of a pandas DataFrame or Series. Reading through the documentation can be …

Indexing and Selecting in Pandas (part 1) Read More »

Connecting to your notebook kernel using Jupyter console

2 Comments / Python / By Matt Wright

Jupyter notebooks are a great way to explore data using Python (and other languages as well). Having a visual representation of your code and output, along with documentation and formatting in one view can be extremely helpful. However, there are some things that are just much better to do in a console session. In this …

Connecting to your notebook kernel using Jupyter console Read More »

Overview of I/O tools in Pandas

Leave a Comment / Pandas, Python / By Matt Wright

Pandas has a lot of functionality, but before you can explore or use it, you’ll most likely want to access some data from an external source. You’ll also likely want to store results for use later or be able to export results to other tools or to share with others. Pandas has a lot of …

Overview of I/O tools in Pandas Read More »

Removing duplicate data in Pandas

Leave a Comment / Pandas, Python / By Matt Wright

It can be very common when dealing with time series data to end up with duplicate data. This can happen for a variety of reasons, and I’ve encountered it more than one time when and tried different approaches to eliminate the duplicate values. There’s a gem of a solution on Stack Overflow and I thought …

Removing duplicate data in Pandas Read More »

Converting types in Pandas

Leave a Comment / Pandas, Python / By Matt Wright

Pandas is great for dealing with both numerical and text data. In most projects you’ll need to clean up and verify your data before analysing or using it for anything useful. Data might be delivered in databases, csv or other formats of data file, web scraping results, or even manually entered. Once you have loaded …

Converting types in Pandas Read More »

Posts navigation
← Previous Page 1 … 3 4 5 6 Next Page →

Top Posts

  • How to use ipywidgets to make your Jupyter notebook interactive
  • How to view all your variables in a Jupyter notebook
  • Passing date arguments to a Python script using argparse
  • How to connect to Interactive Brokers using Python
  • Parameterizing and automating Jupyter notebooks with papermill

free pandas e-book

Master the basics of indexing and selecting data in pandas with my free e-book.

Invalid email address
I promise not to spam you, and you can unsubscribe at any time.
Thanks for subscribing! Check your email for details on getting the cheatsheet and Jupyter notebooks.

Copyright © 2025 wrighters.io