• 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 Collapse Multiple Columns in Pandas? Groupby with Dictionary

September 15, 2018 by cmdlinetips

Collapse columns with Groupby and Dictionary

Often you may want to collapse two or multiple columns in a Pandas data frame into one column. For example, you may have a data frame with data for each year as columns and you might want to get a new column which summarizes multiple columns. One may need to have flexibility of collapsing columns […]

Filed Under: groupby, Pandas DataFrame, Python Tagged With: Pandas Collapse Columns, Pandas Combine Columns, Pandas Data Frame

How To Convert a Column to Row Name/Index in Pandas?

September 2, 2018 by cmdlinetips

Pandas has a method set_index to covert a column in Pandas dataframe into rowname or row index. Let us see an example of converting a column name into rowname in Pandas. Let us load pandas as “pd”. Let us use real-world gapminder data from vega_datasets. Convert a Column to Row Name Let us convert the […]

Filed Under: Data Science, Pandas DataFrame, Python Tagged With: column to rowname, Pandas, Python Tips

Short videos to Learn Basics of Probability and Statistics

August 21, 2018 by cmdlinetips

Basic concepts in Probability and statistics are at the heart of Data Science. And there is no better person than Prof.Joe Blitzstein to learn Probability and statistics. Joe has come up with amazing short videos explaining the basic concepts for his new course. If you are data science beginner or a veteran, Joe’s short videos […]

Filed Under: Data Science Tagged With: Statistics

ggplot2 Version 3.0.0 Brings Tidy Evaluation to ggplot

July 18, 2018 by cmdlinetips

ggplot2 Version 3.0.0 Supports Tidy Eval

RStudio has unveiled major updates to ggplot2 with new version 3.0.0. The new ggplot2 version is available on CRAN about two weeks ago. ggplot2 3.0.0 was originally announced as ggplot2 2.3.0, but big updates made RStudio to bump the version number to 3.0.0. One of the biggest additions in the new version is that ggplo2 […]

Filed Under: ggplot2, R, R Tips, Tidy Eval in ggplot2, Tidy Evaluation Tagged With: ggplot2 3.0.0, Tidy Eval in ggplot2, tidy evaluation

Publication Quality Graphics in #rstats

June 27, 2018 by cmdlinetips

The visualization guru, Edward Tufte, known for all things visualization, tweeted that #rstats alone is not good enough for phublication quality graphics. He claimed “Publication-quality work requires: R + Adobe Illustrator + reasoning about words on graphics + respect for audience/readers/viewers “. #Rstats coders and users just can’t do words on graphics and typography. Proof: […]

Filed Under: Data Visualization, R Tagged With: Data Visualization in R, rstats

  • « Go to Previous Page
  • Page 1
  • Interim pages omitted …
  • Page 49
  • Page 50
  • Page 51
  • Page 52
  • Page 53
  • 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