• Skip to secondary menu
  • Skip to main content
  • Skip to primary sidebar

Python and R Tips

Learn Data Science with Python and R

  • Home
  • Python
  • Pandas
    • Pandas 101
  • tidyverse
    • tidyverse 101
  • R
  • Linux
  • About
    • Privacy Policy
You are here: Home / Archives for Python

Python

How To Make Scatter Plot in Python with Seaborn?

April 8, 2019 by cmdlinetips

Adjusting Transparency in Scatter Plot

Scatter plots are a useful visualization when you have two quantitative variables and want to understand the relationship between them. In this post we will see examples of making scatter plots using Seaborn in Python. We will first make a simple scatter plot and improve it iteratively. Let us first load the packages we need […]

Filed Under: Python Tips, Scatter Plot with Python, Scatter Plot with Seaborn Tagged With: log scale Plot Python, Scatter Plot with Python, Scatter Plot with Seaborn

How To Select Columns Using Prefix/Suffix of Column Names in Pandas?

April 1, 2019 by cmdlinetips

How to Select Columns with Prefix in Pandas Python

Selecting one or more columns from a data frame is straightforward in Pandas. For example, if we want to select multiple columns with names of the columns as a list, we can one of the methods illustrated in How To Select One or More Columns in Pandas? Sometimes you may be working with a larger […]

Filed Under: Pandas filter function, Pandas select columns, Pandas select columns using prefix Tagged With: Pandas filter function, Pandas select columns

How to Get Top N Rows with in Each Group in Pandas?

March 29, 2019 by cmdlinetips

In this post we will see how to get top N rows from a data frame such that the top values of a specific variable in each group defined by another variable. Note this is not the same as top N rows according to one variable in the whole dataframe. Let us say we have […]

Filed Under: Python Tips Tagged With: pandas groupby(), Pandas top N rows in each group, Pandas top rows

How To Select One or More Columns in Pandas?

March 24, 2019 by cmdlinetips

How To Select Columns in Python Pandas?

Selecting a column or multiple columns from a Pandas dataframe is a common task in exploratory data analysis in doing data science/munging/wrangling. In this post, we will see examples of How to select one column from Pandas dataframe? How to select multiple columns from Pandas dataframe? Let us first load Pandas library Let us use […]

Filed Under: Pandas Select a Column, Pandas Select Multiple Columns, Python, Python Tips, Select Columns Pandas Tagged With: Pandas Select a Column, Pandas Select Multiple Columns, Select Columns Pandas

How to Select Top N Rows with the Largest Values in a Column(s) in Pandas?

March 18, 2019 by cmdlinetips

Sometimes, while doing data wrangling, we might need to get a quick look at the top rows with the largest or smallest values in a column. This kind of quick glance at the data reveal interesting information in a dataframe. Pandas dataframe easily enables one to have a quick look at the top rows either […]

Filed Under: Pandas DataFrame, Pandas nlargest, Python Tagged With: Pandas Dataframe, Pandas nlargest

  • « Go to Previous Page
  • Page 1
  • Interim pages omitted …
  • Page 17
  • Page 18
  • Page 19
  • Page 20
  • Page 21
  • Interim pages omitted …
  • Page 35
  • Go to Next Page »

Primary Sidebar

Subscribe to Python and R Tips and Learn Data Science

Learn Pandas in Python and Tidyverse in R

Tags

Altair Basic NumPy Book Review Data Science Data Science Books Data Science Resources Data Science Roundup Data Visualization Dimensionality Reduction Dropbox Dropbox Free Space Dropbox Tips Emacs Emacs Tips ggplot2 Linux Commands Linux Tips Mac Os X Tips Maximum Likelihood Estimation in R MLE in R NumPy Pandas Pandas 101 Pandas Dataframe Pandas Data Frame pandas groupby() Pandas select columns Pandas select_dtypes Python Python 3 Python Boxplot Python Tips R rstats R Tips Seaborn Seaborn Boxplot Seaborn Catplot Shell Scripting Sparse Matrix in Python tidy evaluation tidyverse tidyverse 101 Vim Vim Tips

RSS RSS

  • How to convert row names to a column in Pandas
  • How to resize an image with PyTorch
  • Fashion-MNIST data from PyTorch
  • Pandas case_when() with multiple examples
  • An Introduction to Statistical Learning: with Applications in Python Is Here
  • 10 Tips to customize ggplot2 title text
  • 8 Plot types with Matplotlib in Python
  • PCA on S&P 500 Stock Return Data
  • Linear Regression with Matrix Decomposition Methods
  • Numpy’s random choice() function

Copyright © 2026 · Lifestyle Pro on Genesis Framework · WordPress · Log in

Go to mobile version