MOONBOOKS
  • Notes
  • Tutorials
  • Courses
  • Videos
  • Datasets
  • Version
    • English
    • French
  • Sign-Up
Join-Us
Notes Articles Jupyter PDF
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
Thumbnail 1

How to check if any element of a list is in a string variable in python ?

by Benjamin Marchant
Edited: March 8, 2021, 2:58 p.m.
Tags: Python;

Public
Thumbnail 1

How to check if two columns are equal (identical) with pandas ?

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

Public
Thumbnail 1

How to find the number of occurrence of matrix element with numpy in python ?

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

Public
Thumbnail 1

How to downsample a matrix by keeping only one element every n*n blocks with numpy ?

by Benjamin Marchant
Edited: March 2, 2021, 2:56 p.m.
Tags: Python; Numpy;

Public
Thumbnail 1

How to plot a bar chart with a colorbar using matplotlib in python ?

by Benjamin Marchant
Edited: March 1, 2021, 6:54 p.m.
Tags: Python; Matplotlib; Numpy;

Public
Thumbnail 1

How to find indices where values are true in a boolean matrix with numpy in python ?

by Benjamin Marchant
Edited: Feb. 23, 2021, 8:48 p.m.
Tags: Python; Numpy;

Public
Thumbnail 1

How to retrieve parameters of a slice object in python ?

by Benjamin Marchant
Edited: Feb. 23, 2021, 7:54 p.m.
Tags: Python;

Public
Thumbnail 1

How to get column index from column name with pandas ?

by Benjamin Marchant
Edited: Feb. 23, 2021, 2:15 p.m.
Tags: Python; Pandas; DataFrame;

Public
Thumbnail 1

How to remove (drop) duplicate columns with pandas ?

by Benjamin Marchant
Edited: Feb. 22, 2021, 8:16 p.m.
Tags: Python; Pandas; DataFrame;

Public
Thumbnail 1

How to add multiple columns to a dataframe with pandas ?

by Benjamin Marchant
Edited: Feb. 22, 2021, 2:48 p.m.
Tags: Python; Pandas; DataFrame;

Public
Thumbnail 1

How to remove unused css using google chrome and python (example with bootstrap.min.css) ?

by Benjamin Marchant
Edited: Feb. 21, 2021, 12:31 a.m.
Tags: Chrome; CSS; Python;

Public
Thumbnail 1

How to rename a dataframe index in pandas ?

by Benjamin Marchant
Edited: Feb. 20, 2021, 2:44 p.m.
Tags: Python; Pandas; DataFrame;

Public
Thumbnail 1

How to filter a queryset of objects created less than n hours ago from now with Django ?

by Benjamin Marchant
Edited: Jan. 5, 2021, 8:51 p.m.
Tags: Python; Django;

Public
Thumbnail 1

How to calculate the difference between now and a model DateTimeField for a Django app ?

by Benjamin Marchant
Edited: Jan. 5, 2021, 7:17 p.m.
Tags: Python; Django;

Public
Thumbnail 1

How to create a scatter plot using two columns of a dataframe with pandas in python ?

by Benjamin Marchant
Edited: Dec. 21, 2020, 9:49 p.m.
Tags: Python; Pandas; DataFrame;

Public
Thumbnail 1

How to check if a set is a subset of another set in python ?

by Benjamin Marchant
Edited: Dec. 19, 2020, 3:15 p.m.
Tags: Python;

Public
Thumbnail 1

How to fix KeyError: 'PROJ_LIB' while using basemap in python ?

by Benjamin Marchant
Edited: Dec. 18, 2020, 8:47 p.m.
Tags: Python; Basemap;

Public
Thumbnail 1

How to create a histogram from a dataframe using pandas in python ?

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

Public
Thumbnail 1

How to create a new list by adding elements from multiple lists of same length in python ?

by Benjamin Marchant
Edited: Dec. 17, 2020, 6:43 p.m.
Tags: Python; List;

Public
Thumbnail 1

How to get the size (e.g. number of elements) of a matrix with numpy in python ?

by Benjamin Marchant
Edited: Dec. 16, 2020, 7:39 p.m.
Tags: Python; Numpy;

Public
Thumbnail 1

How to print something only every n iterations in python ?

by Benjamin Marchant
Edited: Dec. 16, 2020, 6:02 p.m.
Tags: Python;

Public
Thumbnail 1

How to create and plot a confusion matrix (or crosstab) from two dataframe columns using pandas in python ?

by Benjamin Marchant
Edited: Dec. 16, 2020, 2:23 p.m.
Tags: Python; Pandas; DataFrame;

Public
Thumbnail 1

How to plot array values against one axis with numpy in python ?

by Benjamin Marchant
Edited: Dec. 16, 2020, 3:21 a.m.
Tags: Python; Numpy;

Public
Thumbnail 1

How to get the intersection between two sets in python ?

by Benjamin Marchant
Edited: Nov. 20, 2020, 3:36 a.m.
Tags: Python;

Public
Thumbnail 1

How to upsample an array (matrix) by repeating elements using numpy in python ?

by Benjamin Marchant
Edited: Nov. 18, 2020, 2:38 p.m.
Tags: Python; Numpy;

Public
Thumbnail 1

How to check if two dictionaries are the same in python ?

by Benjamin Marchant
Edited: Nov. 17, 2020, 3:18 a.m.
Tags: Python;

Public
Thumbnail 1

How to convert a dataframe to a dictionary with pandas in python ?

by Benjamin Marchant
Edited: Nov. 17, 2020, 2:43 a.m.
Tags: Python; Pandas; DataFrame;

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