diff --git a/tabulate/__init__.py b/tabulate/__init__.py index e100c09..9670947 100644 --- a/tabulate/__init__.py +++ b/tabulate/__init__.py @@ -1523,7 +1523,7 @@ def _normalize_tabular_data(tabular_data, headers, showindex="default"): elif ( headers == "keys" and hasattr(tabular_data, "dtype") - and getattr(tabular_data.dtype, "names") + and tabular_data.dtype.names ): # numpy record array headers = tabular_data.dtype.names