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

How to always generate the same random numbers with numpy ?

by Benjamin Marchant
Edited: Feb. 21, 2023, 4:02 p.m.
Tags: Python; Numpy;

Public
Thumbnail 1

How to merge multiple Pandas DataFrames based on multiple columns ?

by Benjamin Marchant
Edited: Feb. 21, 2023, 1:22 a.m.
Tags: Python; Pandas; Dataframe;

Public
Thumbnail 1

How to loop through the initial n rows of a pandas DataFrame in python ?

by Benjamin Marchant
Edited: Feb. 20, 2023, 2:08 p.m.
Tags: Python; Pandas; Dataframe;

Public
Thumbnail 1

How to apply a function to an individual or multiple columns of a pandas DataFrame ?

by Benjamin Marchant
Edited: Feb. 20, 2023, 1:55 p.m.
Tags: Pandas; python;

Public
Thumbnail 1

How to apply a function across multiple columns in a pandas DataFrame and create several new ones ?

by Benjamin Marchant
Edited: Feb. 20, 2023, 12:43 a.m.
Tags: Python; Pandas; Dataframe;

Public
Thumbnail 1

How to get the number of days in a month using python ?

by Benjamin Marchant
Edited: Feb. 19, 2023, 7:26 p.m.
Tags: Python; Calendar;

Public
Thumbnail 1

Get the absolute difference between two pandas dataframe columns

by Benjamin Marchant
Edited: Feb. 19, 2023, 5:10 p.m.
Tags: Python; Pandas; Dataframe;

Public
Thumbnail 1

How to generate a matrix of random floats with numpy ?

by Benjamin Marchant
Edited: Feb. 19, 2023, 2:30 p.m.
Tags: Python; Numpy;

Public
Thumbnail 1

How to round the values of a pandas DataFrame ?

by Benjamin Marchant
Edited: Feb. 19, 2023, 1:11 a.m.
Tags: Python; Pandas; Dataframe;

Public
Thumbnail 1

How to install and run a basic C++ program on an Apple Mac ?

by Benjamin Marchant
Edited: Feb. 18, 2023, 3:54 p.m.
Tags: C++; Apple Mac;

Public
Thumbnail 1

How to set 0 as the middle point in a matplotlib diverging colormap ?

by Benjamin Marchant
Edited: Feb. 18, 2023, 3:53 p.m.
Tags: Python; Matplotlib; Colormap;

Public
Thumbnail 1

How to install tensorflow on a mac studio ?

by Benjamin Marchant
Edited: Dec. 14, 2022, 3:05 a.m.
Tags: Python; TensorFlow; Apple Mac;

Public
Thumbnail 1

How to change image format to a webp using python ?

by Benjamin Marchant
Edited: Dec. 14, 2022, 2:44 a.m.
Tags: Python; Webp;

Public
Thumbnail 1

How to add a robots.txt file for a Django App ?

by Benjamin Marchant
Edited: Dec. 10, 2022, 4:16 a.m.
Tags: Django; Python;

Public
Thumbnail 1

How to remove a character from a string in python ?

by Benjamin Marchant
Edited: Dec. 9, 2022, 7:52 p.m.
Tags: Python; Strings;

Public
Thumbnail 1

How to get the sign of a number (e.g -1 or +1) in python ?

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

Public
Thumbnail 1

How to find the number of occurrences in a list of tuples in python ?

by Benjamin Marchant
Edited: Dec. 9, 2022, 7:47 p.m.
Tags: Python; List; Tuple;

Public
Thumbnail 1

How to plot a heatmap (gridded data) on a global map with cartopy in python ?

by Benjamin Marchant
Edited: Dec. 9, 2022, 7:45 p.m.
Tags: Python; Cartopy;

Public
Thumbnail 1

How to evaluate and plot a 2D function in python ?

by Benjamin Marchant
Edited: Dec. 9, 2022, 7:38 p.m.
Tags: Python; Numpy; Function; Meshgrid;

Public
Thumbnail 1

How to store a condition in a string and use the built-in function eval() in python ?

by Benjamin Marchant
Edited: Dec. 9, 2022, 7:36 p.m.
Tags: Python; Conditional Statements; Loop;

Public
Thumbnail 1

How to get the absolute value of a dataframe column in pandas ?

by Benjamin Marchant
Edited: Dec. 9, 2022, 7:29 p.m.
Tags: Python; Pandas; DataFrame;

Public
Thumbnail 1

How to skip an iteration in a loop if a condition is verified in python ?

by Benjamin Marchant
Edited: Dec. 9, 2022, 7:24 p.m.
Tags: Python; Loop;

Public
Thumbnail 1

How to integrate (embed) a d3 observable notebook visualization into a website ?

by Benjamin Marchant
Edited: Dec. 9, 2022, 7:22 p.m.
Tags: d3; Data Driven Decisions; Javascript; Observable;

Public
Thumbnail 1

How to store a pandas dataframe into a json file ?

by Benjamin Marchant
Edited: Dec. 9, 2022, 7:20 p.m.
Tags: Python; Pandas; DataFrame; JSON;

Public
Thumbnail 1

How to select dataframe columns that end with *** with pandas ?

by Benjamin Marchant
Edited: Dec. 9, 2022, 7:17 p.m.
Tags: Python; Pandas; DataFrame;

Public
Thumbnail 1

How to find all dataframe columns that contain a given word with pandas ?

by Benjamin Marchant
Edited: Dec. 9, 2022, 7:16 p.m.
Tags: Python; Pandas; DataFrame;

Public
Thumbnail 1

How to create a new column of initials from a full name dataframe column with pandas and python ?

by Benjamin Marchant
Edited: Dec. 9, 2022, 7:14 p.m.
Tags: Python; Pandas; DataFrame; Regex;

Public
Thumbnail 1

How to split a full name column into a first and last name columns with pandas in python ?

by Benjamin Marchant
Edited: Dec. 9, 2022, 7:12 p.m.
Tags: Python; Pandas; DataFrame;

Public
Thumbnail 1

How to merge (concatenate) two or more dataframe columns into one column with pandas ?

by Benjamin Marchant
Edited: Dec. 9, 2022, 7:10 p.m.
Tags: Python; Pandas; DataFrame;

Public
Thumbnail 1

How to extract first letter of each word in a sentence with python using a regular expression ?

by Benjamin Marchant
Edited: Dec. 9, 2022, 7:08 p.m.
Tags: Python; Regular Expression;

Public
Thumbnail 1

How to pad a numpy array in python ?

by Benjamin Marchant
Edited: Dec. 9, 2022, 7:04 p.m.
Tags: Python; Numpy;

Public
Thumbnail 1

How to add a border (frame) to an image using python ?

by Benjamin Marchant
Edited: Dec. 9, 2022, 7:03 p.m.
Tags: Python; Numpy; Image;

Public
Thumbnail 1

How to apply a one hot encoding to a pandas dataframe categorical data column using get_dummies() ?

by Benjamin Marchant
Edited: Dec. 9, 2022, 7:02 p.m.
Tags: Python; Pandas; Machine Learning;

Public
Thumbnail 1

How to replace dataframe columns by another dataframe columns with pandas ?

by Benjamin Marchant
Edited: Dec. 9, 2022, 7:01 p.m.
Tags: Python; Pandas; DataFrame;

Public
Thumbnail 1

How to save a Tensorflow / Keras model weights in a HDF file ?

by Benjamin Marchant
Edited: Dec. 9, 2022, 7 p.m.
Tags: Python; Tensorflow; Keras;

Public
Thumbnail 1

How to assess if an expression is true in python using assert ?

by Benjamin Marchant
Edited: Dec. 9, 2022, 6:59 p.m.
Tags: Python;

Public
Thumbnail 1

How to create a confusion matrix and extract the true and false positives and true and false negatives using scikit learn in python ?

by Benjamin Marchant
Edited: Dec. 9, 2022, 6:58 p.m.
Tags: Python; Scikit Learn; Machine Learning;

Public
Thumbnail 1

How to check if a javascript variable is an array ?

by Benjamin Marchant
Edited: Dec. 9, 2022, 6:57 p.m.
Tags: Javascript; Array;

Public
Thumbnail 1

How to create an array in javascript and get an element by index ?

by Benjamin Marchant
Edited: Dec. 9, 2022, 6:56 p.m.
Tags: Javascript; Array;

Public
Thumbnail 1

How to convert a string object representation to a string in javascript ?

by Benjamin Marchant
Edited: Dec. 9, 2022, 6:55 p.m.
Tags: Javascript;

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