How can I implement a progress bar on a non-iterable line of code?

How can I implement a progress bar on a non-iterable line of code?

Asked on May 2, 2019 in Python.
Add Comment


  • 1 Answer(s)

    Several lines of code in Python script that takes from 20 minutes to several hours depending on the size
    files to be read.If it would be possible to implement a progress bar that would track the progress towards completion.
    we understand that tqdm and progressbar2 are most often used in cases in for loop.

    gjson2 = rasterstats.zonal_stats(polygons, raster, prefix='xyz_', geojson_out=True,all_touched=False,categorical=True)
    
    Answered on May 2, 2019.
    Add Comment


  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.