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

How to ignore some files (eg. ds_store) or folders (eg. __pycache__) using .gitignore when pushing with git ?

by Benjamin Marchant
Edited: July 18, 2021, 4:13 a.m.
Tags: Github; gitignore;

Public
Thumbnail 1

How to dynamically add new attributes to a class in python ?

by Benjamin Marchant
Edited: July 18, 2021, 12:15 a.m.
Tags: Python; Class;

Public
Thumbnail 1

How to get in a python script its path ?

by Benjamin Marchant
Edited: July 13, 2021, 7:40 p.m.
Tags: Python; Script;

Public
Thumbnail 1

How to read a file from a python package subdirectory ?

by Benjamin Marchant
Edited: July 6, 2021, 9:24 p.m.
Tags: Python; Package; Module;

Public
Thumbnail 1

How to split a 2D array into a list of smaller 2D arrays in python with numpy ?

by Benjamin Marchant
Edited: July 6, 2021, 6:33 p.m.
Tags: Python; Numpy;

Public
Thumbnail 1

Big O Exercise: How to create an efficient algorithm to sort a list in python ?

by Benjamin Marchant
Edited: May 28, 2021, 6:54 p.m.
Tags: Big 0; Python; List;

Public
Thumbnail 1

How to learn SQL (Structured Query Language) using a jupyter notebook ?

by Benjamin Marchant
Edited: May 21, 2021, 10:30 p.m.
Tags: SQL; Jupyter Notebook;

Public
Thumbnail 1

How to use Groupby and Aggregate operations for exploratory data analysis with pandas ? (Jupyter Notebook)

by Benjamin Marchant
Edited: May 21, 2021, 10:28 p.m.
Tags: Pandas; GroupBy; Jupyter Notebook;

Public
Thumbnail 1

How to swap two or more elements in a list in python ?

by Benjamin Marchant
Edited: May 19, 2021, 9:27 p.m.
Tags: Python; List;

Public
Thumbnail 1

How to remove a key in a dictionary in python ?

by Benjamin Marchant
Edited: May 18, 2021, 2:43 p.m.
Tags: Python; Dictionary;

Public
Thumbnail 1

How to put data from a CSV file in a matrix in python using numpy ?

by Benjamin Marchant
Edited: May 17, 2021, 8:25 p.m.
Tags: Python; Numpy; CSV;

Public
Thumbnail 1

How to import (load) an image in python ?

by Benjamin Marchant
Edited: May 4, 2021, 3:47 p.m.
Tags: Python; Pillow; Matplotlib;

Public
Thumbnail 1

How to fix ValueError: Failed to convert a NumPy array to a Tensor ( TensorFlow / Keras ) ?

by Benjamin Marchant
Edited: May 3, 2021, 9:45 p.m.
Tags: Python; TensorFlow; Machine Learning;

Public
Thumbnail 1

How to fill dataframe row missing (NaN) values using previous row values with pandas ?

by Benjamin Marchant
Edited: May 3, 2021, 1:45 p.m.
Tags: Python; Pandas; DataFrame;

Public
Thumbnail 1

How to create an animated image (GIF) using Imagemagick and python ?

by Benjamin Marchant
Edited: May 2, 2021, 11:55 p.m.
Tags: Python; Imagemagick; GIF;

Public
Thumbnail 1

How to extract the decimal part (or fractional part) of a float number in python ?

by Benjamin Marchant
Edited: April 14, 2021, 3:13 p.m.
Tags: Python;

Public
Thumbnail 1

How to calculate a tangent for a given angle in python ?

by Benjamin Marchant
Edited: April 13, 2021, 6:57 p.m.
Tags: Python; Math;

Public
Thumbnail 1

How to find indices of a given value in a numpy array (or matrix) in python ?

by Benjamin Marchant
Edited: April 13, 2021, 5:18 p.m.
Tags: Python: Numpy; Where;

Public
Thumbnail 1

How to visualize (plot) a numpy array in python using seaborn ?

by Benjamin Marchant
Edited: April 12, 2021, 2:13 p.m.
Tags: Python; Numpy; Array; Seaborn;

Public
Thumbnail 1

How to iterate over a row in a numpy array (or 2D matrix) in python ?

by Benjamin Marchant
Edited: April 12, 2021, 1:50 p.m.
Tags: Python; Numpy; Array; Matrix;

Public
Thumbnail 1

How to iterate over a column in a numpy array (or 2D matrix) in python ?

by Benjamin Marchant
Edited: April 12, 2021, 1:31 p.m.
Tags: Python; Numpy; Array; Matrix;

Public
Thumbnail 1

How to create a sub list inside a list (a nested list) in HTML ?

by Benjamin Marchant
Edited: April 8, 2021, 12:02 a.m.
Tags: HTML; CSS; List;

Public
Thumbnail 1

How to slice (split) a dataframe by column value with pandas in python ?

by Benjamin Marchant
Edited: April 7, 2021, 7:56 p.m.
Tags: Python; Pandas; DataFrame;

Public
Thumbnail 1

How to plot a contingency table (heatmap) in python using seaborn and matplotlib ?

by Benjamin Marchant
Edited: March 31, 2021, 4:59 p.m.
Tags: Python; Matplotlib; Seaborn; Numpy;

Public
Thumbnail 1

How to convert a dataframe column to an array with pandas ?

by Benjamin Marchant
Edited: March 30, 2021, 9:42 p.m.
Tags: Python; Pandas; DataFrame;

Public
Thumbnail 1

How to check if all elements of a list are also in another list in python ?

by Benjamin Marchant
Edited: March 29, 2021, 3:52 p.m.
Tags: Python; List;

Public
Thumbnail 1

How to check if a word is in a list composed of words and sentences in python ?

by Benjamin Marchant
Edited: March 29, 2021, 3:40 p.m.
Tags: Python; List;

Public
Thumbnail 1

How to check if a list is empty in python ?

by Benjamin Marchant
Edited: March 29, 2021, 1:17 p.m.
Tags: Python; List;

Public
Thumbnail 1

How to plot CALIOP 01km & 05km Cloud Layer Products with python ?

by Benjamin Marchant
Edited: March 25, 2021, 2:25 p.m.
Tags: Python; CALIOP; 01kmClay; 05kmClay;

Public
Thumbnail 1

How to iterate only over the first n elements of a very large dictionary in python ?

by Benjamin Marchant
Edited: March 24, 2021, 7:39 p.m.
Tags: Python; Dictionary;

Public
Thumbnail 1

How to sort dictionary keys by alphabetical order (create an ordered dictionary) in python ?

by Benjamin Marchant
Edited: March 24, 2021, 7:15 p.m.
Tags: Python; Dictionary;

Public
Thumbnail 1

How to create a dataframe from a list (or multiple lists) with pandas ?

by Benjamin Marchant
Edited: March 24, 2021, 2:10 p.m.
Tags: Python; Pandas; DataFrame;

Public
Thumbnail 1

How to add a new column of nan values in an array (matrix) with numpy in python ?

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

Public
Thumbnail 1

How to create a matrix with only NAN values with numpy ?

by Benjamin Marchant
Edited: March 24, 2021, 2:02 a.m.
Tags: Python; Numpy; Matrix;

Public
Thumbnail 1

How to find all keys in a dictionary with a given value in python ?

by Benjamin Marchant
Edited: March 24, 2021, 12:07 a.m.
Tags: Python; Dictionary;

Public
Thumbnail 1

How to generate random names (first and last names) with python ?

by Benjamin Marchant
Edited: March 23, 2021, 7:16 p.m.
Tags: Python;

Public
Thumbnail 1

How to do something while a condition is true in python ?

by Benjamin Marchant
Edited: March 18, 2021, 6:02 p.m.
Tags: Python;

Public
Thumbnail 1

How to add an empty column to an existing dataframe with pandas ?

by Benjamin Marchant
Edited: March 18, 2021, 1:48 p.m.
Tags: Python; Pandas; DataFrame;

Public
Thumbnail 1

How to add a new axis to transform a matrix of shape (n,) to (n,1) with numpy in python ?

by Benjamin Marchant
Edited: March 12, 2021, 5:02 a.m.
Tags: Python; Numpy;

Public
Thumbnail 1

How to select in a matrix a given index and its neighbors using numpy in python ?

by Benjamin Marchant
Edited: March 10, 2021, 3:24 a.m.
Tags: Python; Numpy;

Public
  • Prev
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • Next
Copyright © 2026 - All rights reserved Contact Us Terms & Conditions