Given a random raster tif file, I want to set all cells which have a value of 0, to 'no data' using Python/rasterio. I just cant seem to find documentation about this simple operation.
import rasterio
src = rasterio.open('some_grid.tif')
...........
With R's raster package, with which I'm way more literate, I would perform this operation like this:
library(raster)
rast <- raster('some_grid.tif')
rast[rast == 0] <- NA