• 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

3 Examples Using Pivot Table in Pandas

December 26, 2018 by cmdlinetips

Pandas Pivot Example

One of the most common tasks in data science is to manipulate the data frame we have to a specific format. For example, sometime we may want to take data frame with fewer columns, say in long format, summarize and convert into a data frame with multiple columns, i.e. a wide data frame. Python Pandas […]

Filed Under: Pandas Pivot Table, Python Pivot, Python pivot table Tagged With: Pandas Pivot Table, Python Pivot, Python pivot table

How To Merge/Join DataFrames with Pandas in Python?

December 22, 2018 by cmdlinetips

Inner Join with Pandas Merge

One of the most common data science tasks – data munge/data cleaning, is to combine data from multiple sources. When you have the data in tabular forms, Python Pandas offers great functions to merge/join data from multiple data frames. Here we will see example scenarios of common merging operations with simple toy data frames. Let […]

Filed Under: Merge Dataframes, Pandas DataFrame, Pandas Merge, Pandas Tutorial, Python Tips Tagged With: Pandas Merge, Pandas Merge Dataframe, Python Merge Dataframes

3 Ways To Create a List Repeating an Item

December 16, 2018 by cmdlinetips

Sometimes, you may want to create a list in Python such that it contains the same element repeated many times. In Python, you can create such a repeat list easily using many approaches. Here are three ways one can create a list with a single element repeated ‘n’ times. 1. How to Create a Repeat […]

Filed Under: itertools.repeat, Python Create List repeating elements Tagged With: create repeat list, itertools.repeat

Simulating Coin Toss Experiment in Python with NumPy

December 13, 2018 by cmdlinetips

Tossing a one or more coins is a great way to understand the basics of probability and how to use principles of probability to make inference from data. Let us simulate coin toss experiment with Python. Mathematically, coin toss experiment can be thought of a Binomial experiment, where we have a coin with probability of […]

Filed Under: Coin toss experiment in Python Tagged With: Binomial Distribution in Python, Coin toss experiment in Python, Simulating Coin Toss

10 Basic Arithmetic Operations with NumPy array

December 9, 2018 by cmdlinetips

NumPy is the fundamental package for scientific computing with Python. It contains among other things: a powerful N-dimensional array object sophisticated (broadcasting) functions tools for integrating C/C++ and Fortran code useful linear algebra, Fourier transform, and random number capabilities

NumPy is one of most fundamental Python packages for doing any scientific computing in Python. NumPy’s N-dimenisonal array structure offers fantastic tools to numerical computing with Python. Let us see 10 most basic arithmetic operations with NumPy that will help greatly with Data Science skills in Python. Let us first load the NumPy library Let […]

Filed Under: NumPy, NumPy Basics, Python Tips Tagged With: Basic NumPy, NumPy Arithmetics, NumPy Tutorial

  • « Go to Previous Page
  • Page 1
  • Interim pages omitted …
  • Page 20
  • Page 21
  • Page 22
  • Page 23
  • Page 24
  • 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