Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import arcpy
- import pandas as pd
- import numpy as np
- raster = r"X:RGBraster3.tif" #Change
- out_excel = r"X:RGBexcel.xlsx" #Change
- arr = arcpy.RasterToNumPyArray(raster)
- with pd.ExcelWriter(out_excel) as writer:
- for colorband in range(3):
- df = pd.DataFrame(arr[colorband])
- df.to_excel(writer,sheet_name='Band_{0}'.format(colorband), header=False, index=False)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement