I have a dataset that contains a date attribute and records show date/time. How can I count then number of unique dates while disregarding the time stamp?
If you can load your data into a pandas DataFrame (a "GeoAccessor" in the Python API), it's simple:
from arcgis.features import GeoAccessor # load layer into dataframe df = GeoAccessor.from_featureclass('path/to/fc') # create new date field, dropping time df['the_date'] = df['your_datetime_field'].dt.date # get the count df.groupby('the_date').count()
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.