{"library":"pygrinder","title":"PyGrinder","description":"A Python toolkit for introducing missing values into datasets under various missingness mechanisms (MCAR, MAR, MNAR) and patterns (point, sequential, block). Current version: 0.7. Requires Python >=3.8. Released quarterly.","language":"python","status":"active","last_verified":"Mon Apr 27","install":{"commands":["pip install pygrinder"],"cli":null},"imports":["from pygrinder import mcar","from pygrinder import mar_logistic","from pygrinder import mnar_x","from pygrinder import mnar_t","from pygrinder import mnar_nonuniform","from pygrinder import seq_missing","from pygrinder import block_missing","from pygrinder import rdo","from pygrinder import fill_and_get_mask","from pygrinder import little_mcar_test","from pygrinder import calc_missing_rate"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import numpy as np\nfrom pygrinder import mcar, fill_and_get_mask\n\nX = np.random.randn(100, 10)\ncorrupted_X = mcar(X, rate=0.2)\nX_filled, mask = fill_and_get_mask(corrupted_X, fill_value=0)\nprint(f\"Original shape: {X.shape}, missing rate: {1 - mask.mean():.2f}\")","lang":"python","description":"Basic usage: create MCAR missingness, then fill NaNs and get mask.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}