• 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

How To Visualize Sparse Matrix in Python?

February 28, 2019 by cmdlinetips

Visualizing Sparse Diagonal Matrix

When you work with sparse matrix data structure with SciPy in Python, sometimes you might want to visualize the sparse matrix. A quick visualization can reveal the pattern in the sparse matrix and can tell how “sparse” the matrix is. And it is a great sanity check. One way to visualize sparse matrix is to […]

Filed Under: Spy to visualize sparse matrix, Visualizing Sparse Matrix Tagged With: Sparse Matrix in SciPy, Spy to Visualize Sparse Matrix, Visualizing Sparse Matrix

How To Make Grouped Boxplots with ggplot2?

February 25, 2019 by cmdlinetips

Customizing Grouped Boxplot

Boxplots are great to visualize distributions of multiple variables. ggplot2 is great to make beautiful boxplots really quickly. Sometimes, you may have multiple sub-groups for a variable of interest. In those situation, it is very useful to visualize using “grouped boxplots”. In R, ggplot2 package offers multiple options to visualize such grouped boxplots. Let us […]

Filed Under: Boxplot facet_wrap, Boxplots with ggplot, Grouped Boxplot, R Tips Tagged With: Boxplot facet_wrap, Grouped Boxplot, Grouped Boxplot in ggplot2

How To Create Random Sparse Matrix of Specific Density?

February 21, 2019 by cmdlinetips

How To Create Random Sparse Matrix in Python?

Sometimes, you may want to create sparse random matrices with specific shape and sparsity for testing out a new method or algorithm. Scipy’s sparse module has very useful functionalities that are of great use to create sparse matrices of specific density and from specific probability distributions. Let us see some simple examples of create random […]

Filed Under: Create Random Sparse Matrix Tagged With: Create Random Sparse Matrix, Sparse Random Matrix in Scipy

How To Reorder a Boxplot in R? Hint: Use forcats

February 19, 2019 by cmdlinetips

reorder boxplot R

Sometimes, when one is making boxplot with ggplot2, one might like to order the boxes in a boxplot in a specific way. For example, one might want to sort the boxes in boxplot in ascending or descening order based on the mean or median values of groups in the boxplot. Reordering boxplots can reveal the […]

Filed Under: R Tips, reorder Boxplot in ggplot2, Reorder boxplot with forcats Tagged With: reorder Boxplot in ggplot2, Reorder boxplot with forcats

9 Ways To Create New Variables with tidyverse

February 17, 2019 by cmdlinetips

Add New Variables With tidyverse

When one wants to create a new variable in R using tidyverse, dplyr’s mutate verb is probably the easiest one that comes to mind that lets you create a new column or new variable easily on the fly. It is probably the go to command for every time one needed to make new variable for […]

Filed Under: Create New Column with Tidyverse, R Tips, tidyverse 101 Tagged With: add_column, Create New Column with Tidyverse, mutate_all, mutate_at, rename tidyverse, tidyverse, transmute

  • « Go to Previous Page
  • Page 1
  • Interim pages omitted …
  • Page 44
  • Page 45
  • Page 46
  • Page 47
  • Page 48
  • Interim pages omitted …
  • Page 74
  • 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