laptop and a wrench

Bug

The FeatureLayer class's query_top_features method returns the error message "AttributeError: 'FeatureLayer' object has no attribute '_query_df'".

ArcGIS API for Python
Bug ID Number BUG-000180522
SubmittedOctober 28, 2025
Last ModifiedDecember 30, 2025
Applies toArcGIS API for Python
Version found2.4.1
Operating SystemN/A
Operating System VersionN/A
Version Fixed2.4.3
StatusFixed

Workaround

If a DataFrame is required, set as_df=False and use the .sdf property:

top = layer.query_top_features(param1, as_df=False).sdf

Leave off the .sdf property to get back a FeatureSet:

top = layer.query_top_features(param1, as_df=False)

Steps to Reproduce

Bug ID: BUG-000180522

Software:

  • ArcGIS API for Python

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options