• 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 Create Ordered Dictionary in Python?

September 12, 2019 by cmdlinetips

Dictionary in Python is one of the most useful core data structures in Python. Sometimes, you may want to create a dictionary and also maintain the order of items you inserted when you are iterating the keys. Python’s collections module has OrderedDict that lets you create a ordered dictionary. Let us see an example of […]

Filed Under: Ordered Dictionary Tagged With: Ordered Dictionary, Python Tips

Pearson and Spearman Correlation in Python

August 4, 2019 by cmdlinetips

Distribution of Life Expectancy values from gapminder data

Understanding relationship between two or more variables is at the core of many aspects of data analysis or statistical analysis. Correlation or correlation coefficient captures the association between two variables (in the simplest case),  numerically. One of the commonly used correlation measures is Pearson correlation coefficient. Another commonly used correlation measure is Spearman correlation coefficient. […]

Filed Under: Pearson Correlation in Python, Spearman Correlation in Python Tagged With: Pearson Correlation in Python, Spearman Correlation in Python

Pandas query(): How to Filter Rows of Pandas Dataframe?

July 31, 2019 by cmdlinetips

Pandas offer many ways to select rows from a dataframe. One of the commonly used approach to filter rows of a dataframe is to use the indexing in multiple ways. For example, one can use label based indexing with loc function. Introducing pandas query() function, Jake VanderPlas nicely explains, While these abstractions are efficient and […]

Filed Under: Filter Rows with Query, Pandas 101, Pandas Query, Python Tips Tagged With: Pandas Query, Select Rows with Query

Pandas 0.25.0 is Here. What is New? Named aggregation, explode() and sparse dataframe

July 26, 2019 by cmdlinetips

Pandas Version 0.25.0

If you are like me, you might have missed that the fantastic Pandas team has released the new version Pandas 0.25.0. As one would expect, there are quite a few new things in Pandas 0.25.0. A couple of new enhancements are around pandas’ groupby aggregation. Here are a few new things that look really interesting. […]

Filed Under: Pandas explode(), Pandas Sparse Dataframe, Uncategorized Tagged With: Named aggregation in Pandas, Pandas 0.25.0, Pandas explode() function, Pandas Sparse Dataframe

How To Slice Rows and Columns of Sparse Matrix in Python?

July 4, 2019 by cmdlinetips

Sometimes, while working with large sparse matrices in Python, you might want to select certain rows of sparse matrix or certain columns of sparse matrix. As we saw earlier, there are many types of sparse matrices available in SciPy in Python. Each of the sparse matrix type is optimized for specific operations. We will see […]

Filed Under: Slice Columns of Sparse Matrix, Slice Rows of Sparse Matrix, Slice Sparse Matrix Tagged With: Select rows of Sparse Matrix, Slice Columns of Sparse Matrix, Slice Rows of Sparse Matrix

  • « Go to Previous Page
  • Page 1
  • Interim pages omitted …
  • Page 14
  • Page 15
  • Page 16
  • Page 17
  • Page 18
  • 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