MOONBOOKS
  • Notes
  • Tutorials
  • Courses
  • Videos
  • Datasets
  • Version
    • English
    • French
  • Sign-Up
Join-Us
Notes Articles Jupyter PDF
Thumbnail 1

How to calculate the sine of an angle in python ?

by Benjamin Marchant
Edited: Dec. 9, 2022, 3:25 p.m.
Tags: Python; Math;

Public
Thumbnail 1

How to check if a pandas dataframe is empty in python ?

by Benjamin Marchant
Edited: Dec. 3, 2022, 12:31 a.m.
Tags: Python; Pandas; Dataframe;

Public
Thumbnail 1

How to create a global variable in python ?

by Benjamin Marchant
Edited: Nov. 29, 2022, 10:27 p.m.
Tags: Python; Variables; Global;

Public
Thumbnail 1

How to pass optional arguments in a python function ?

by Benjamin Marchant
Edited: Nov. 29, 2022, 10:14 p.m.
Tags: Python; Function;

Public
Thumbnail 1

How to create a data frame in python using pandas ?

by Benjamin Marchant
Edited: Nov. 29, 2022, 4:19 a.m.
Tags: Python; Pandas; Dataframe;

Public
Thumbnail 1

How to create a pandas dataframe from a python dictionary ?

by Benjamin Marchant
Edited: Nov. 27, 2022, 3:29 a.m.
Tags: Python; Pandas; Dataframe; Dictionary;

Public
Thumbnail 1

How to plot a rectangle on a cartopy map with python ?

by Benjamin Marchant
Edited: Nov. 26, 2022, 3:41 p.m.
Tags: Python; Cartopy; Map; Rectangle;

Public
Thumbnail 1

How to plot a circle on a cartopy map with python ?

by Benjamin Marchant
Edited: Nov. 26, 2022, 3:58 a.m.
Tags: Python; Cartopy; Circle;

Public
Thumbnail 1

How to minify html or css files for improving web site speed using python ?

by Benjamin Marchant
Edited: Nov. 25, 2022, 7:26 p.m.
Tags: Python; HTML; CSS; Minify;

Public
Thumbnail 1

How to merge two folders using python ?

by Benjamin Marchant
Edited: Nov. 24, 2022, 3:10 p.m.
Tags: Python; Linux;

Public
Thumbnail 1

How to switch dictionary keys and values in python ?

by Benjamin Marchant
Edited: Nov. 23, 2022, 2:43 p.m.
Tags: Python; Dictionary;

Public
Thumbnail 1

How to download a file from a public (no credentials) AWS S3 bucket with python ?

by Benjamin Marchant
Edited: Nov. 14, 2022, 3:24 a.m.
Tags: Python; AWS S3;

Public
Thumbnail 1

How to convert a column of float (quantitative data) into categorical data with pandas using cut ?

by Benjamin Marchant
Edited: Sept. 9, 2022, 2:23 a.m.
Tags: Python; Pandas; DataFrame;

Public
Thumbnail 1

How to insert an image encoded in base64 in a jupyter notebook ?

by Benjamin Marchant
Edited: Sept. 2, 2022, 2:11 p.m.
Tags: Python; Jupyter Notebook;

Public
Thumbnail 1

How to convert an image (png, jpg, etc) to base64 string using python ?

by Benjamin Marchant
Edited: Sept. 2, 2022, 2:45 a.m.
Tags: Python; Base64;

Public
Thumbnail 1

How to create a datetime column from year, month and day columns in pandas ?

by Benjamin Marchant
Edited: Nov. 29, 2021, 3:56 a.m.
Tags: Python; Pandas; DataFrame;

Public
Thumbnail 1

How to create a random sample using a reservoir with pandas in python ?

by Benjamin Marchant
Edited: Nov. 3, 2021, 1:46 a.m.
Tags: Python; Pandas; DataFrame; Big Data;

Public
Thumbnail 1

How to plot a RGB image from MODIS MYD021KM products ?

by Benjamin Marchant
Edited: Oct. 17, 2021, 6:33 p.m.
Tags: Python; MODIS; MYD021KM; Visualization;

Public
Thumbnail 1

How to create a matrix of random numbers with numpy in python ?

by Benjamin Marchant
Edited: Sept. 28, 2021, 9:41 p.m.
Tags: Python; Numpy; Random;

Public
Thumbnail 1

How to replace or remove a word in a string in python ?

by Benjamin Marchant
Edited: Sept. 28, 2021, 2:05 a.m.
Tags: Python; Strings;

Public
Thumbnail 1

How to check if a character from a string is a letter, a number, a special character or a whitespace in python ?

by Benjamin Marchant
Edited: Sept. 27, 2021, 7:23 p.m.
Tags: Python; Strings;

Public
Thumbnail 1

How to shift values in a dataframe column with pandas ?

by Benjamin Marchant
Edited: Sept. 27, 2021, 4:07 p.m.
Tags: Python; Pandas; DataFrame;

Public
Thumbnail 1

How to get unique values in a list in python ?

by Benjamin Marchant
Edited: Sept. 23, 2021, 12:11 a.m.
Tags: Python; List;

Public
Thumbnail 1

How to reverse a string in python ?

by Benjamin Marchant
Edited: Sept. 22, 2021, 6:39 p.m.
Tags: Python; Strings;

Public
Thumbnail 1

How to remove leading spaces in a string with python ?

by Benjamin Marchant
Edited: Sept. 22, 2021, 5:52 p.m.
Tags: Python; Strings;

Public
Thumbnail 1

How to find common elements (e.g. intersection) between two lists in python ?

by Benjamin Marchant
Edited: Sept. 21, 2021, 9:14 p.m.
Tags: Python; List;

Public
Thumbnail 1

How to create a list of US states in python ?

by Benjamin Marchant
Edited: Sept. 21, 2021, 6:24 p.m.
Tags: Python; List;

Public
Thumbnail 1

How to convert a matrix of floats into a matrix of integers with numpy in python ?

by Benjamin Marchant
Edited: Sept. 21, 2021, 6 p.m.
Tags: Python; Numpy;

Public
Thumbnail 1

How to calculate the mean along a given axis with numpy in python ?

by Benjamin Marchant
Edited: Sept. 19, 2021, 3:02 a.m.
Tags: Python; Numpy;

Public
Thumbnail 1

How to calculate the sum along an axis with numpy in python ?

by Benjamin Marchant
Edited: Sept. 19, 2021, 2:24 a.m.
Tags: Python; Numpy;

Public
Thumbnail 1

How to add a name or rename an axis of a dataframe with pandas ?

by Benjamin Marchant
Edited: Sept. 18, 2021, 3:09 a.m.
Tags: Python; Pandas; DataFrame;

Public
Thumbnail 1

How to store a multidimensional matrix in a dataframe with pandas ?

by Benjamin Marchant
Edited: Sept. 17, 2021, 6:31 p.m.
Tags: Python; Pandas; DataFrame;

Public
Thumbnail 1

How to swap indexes in a multiple indexes dataframe with pandas ?

by Benjamin Marchant
Edited: Sept. 17, 2021, 4:55 p.m.
Tags: Python; Pandas; DataFrame;

Public
Thumbnail 1

How to create a dataframe with multiple indexes with pandas ?

by Benjamin Marchant
Edited: Sept. 17, 2021, 2:36 a.m.
Tags: Python; Pandas; DataFrame;

Public
Thumbnail 1

How to calculate the Pearson’s Correlation coefficient between two datasets in python ?

by Benjamin Marchant
Edited: Sept. 16, 2021, 7:39 p.m.
Tags: Python; Numpy; Scipy;

Public
Thumbnail 1

How to calculate the absolute value of each element of an array or matrix in python with numpy ?

by Benjamin Marchant
Edited: Sept. 14, 2021, 2:39 a.m.
Tags: Python; Numpy;

Public
Thumbnail 1

How to perform a 1D convolution in python ?

by Benjamin Marchant
Edited: Sept. 13, 2021, 7:21 p.m.
Tags: Python; Numpy; Scipy;

Public
Thumbnail 1

How to add or append a new element to a tuple in python ?

by Benjamin Marchant
Edited: Sept. 9, 2021, 2:52 a.m.
Tags: Python; Tuple; Data Structure;

Public
Thumbnail 1

How to replace rows of a dataframe using rows of another dataframe based on indexes with pandas ?

by Benjamin Marchant
Edited: Sept. 8, 2021, 1:58 a.m.
Tags: Python; Pandas; DataFrame;

Public
Thumbnail 1

How to select nth element in a list with python ?

by Benjamin Marchant
Edited: Sept. 3, 2021, 6:08 p.m.
Tags: Python; List;

Public
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • Next
Copyright © 2026 - All rights reserved Contact Us Terms & Conditions