• 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
  • Conferences
  • Python Books
  • About
    • Privacy Policy
You are here: Home / Archives for Python

Python

How to Change the Position of Legend in Seaborn

August 27, 2021 by cmdlinetips

Seaborn Legend in a row on top of the plot

Seaborn v0.11.2 is here. It is a minor release that fixes issues and also has a few features. One of the useful features is the new convenient function “move_legend()” to change the position of legend in Seaborn. Before Seaborn v0.11.2, Matplotlib’s plt.legend() has been the go to function to change the position of legend in […]

Filed Under: Python Tagged With: Seaborn change legend position, Seaborn move legend

Pandas pct_change(): Add Colors to Percent with style

July 26, 2021 by cmdlinetips

Add Annotations to Pandas pct_change results

Pandas pct_change() function is a handy function that lets us calculate percent change between two rows or two columns easily. By default, pct_change() function works with adjacent rows and columns, but it can compute percent change for user defined period as well. One of the useful features of Pandas pct_change is to add annotation with […]

Filed Under: Pandas 101, Python Tips Tagged With: pandas highlight_max, Pandas pct_change, pandas style

Lesser known Seaborn Tips and Tricks

July 8, 2021 by cmdlinetips

Seaborn Trick Quick Gradient Palette

Want to learn lesser known Seaborn tips and tricks from Micheal Waskom, the developer of Seaborn? Check out his periodical tweets since early this year. Stumbled upon this thread while searching for a specific Seaborn help and worked through some of the tips. Here are a few examples of lesser known Seaborn tips and tricks. […]

Filed Under: Python, Python Tips, Seaborn Tips Tagged With: Python, Seaborn, Seaborn tips

Pandas pct_change() to compute percent change across columns/rows

May 18, 2021 by cmdlinetips

Pandas Compute Percent Change

In this tutorial, we will see how to compute percent change for values in each column. Pandas’ pct_change() function will compute percent change for each value in a column when compared to the previous element in the column by default. Another way to think is Computes the percentage change from the immediately previous row Pandas’ […]

Filed Under: Pandas 101, Pandas pct_change, Python, Python Tips Tagged With: Pandas pct_change

Pandas applymap(): Change values of Dataframe

May 11, 2021 by cmdlinetips

Pandas applymap() to change values of a dataframe

Pandas applymap() is yet another useful function to change the content of a dataframe. In this tutorial, we will learn how to use Pandas applymap() function to replace multiple column values using a dictionary. Earlier, we saw how to use Pandas replace() function to change the values in multiple columns using dictionary. And then we […]

Filed Under: Pandas 101, Pandas applymap, Python, Python Tips Tagged With: Python

  • « Go to Previous Page
  • Page 1
  • Interim pages omitted …
  • Page 5
  • Page 6
  • Page 7
  • Page 8
  • Page 9
  • 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 © 2025 · Lifestyle Pro on Genesis Framework · WordPress · Log in

Go to mobile version