in awswrangler/_data_types.py [0:0]
def athena2pandas(dtype: str) -> str: # pylint: disable=too-many-branches,too-many-return-statements
"""Athena to Pandas data types conversion."""
dtype = dtype.lower()
if dtype == "tinyint":
return "Int8"
if dtype == "smallint":
return "Int16"
if dtype in ("int", "integer"):
return "Int32"
if dtype == "bigint":
return "Int64"
if dtype in ("float", "real"):
return "float32"
if dtype == "double":
return "float64"
if dtype == "boolean":
return "boolean"
if (dtype == "string") or dtype.startswith("char") or dtype.startswith("varchar"):
return "string"
if dtype in ("timestamp", "timestamp with time zone"):
return "datetime64"
if dtype == "date":
return "date"
if dtype.startswith("decimal"):
return "decimal"
if dtype in ("binary", "varbinary"):
return "bytes"
raise exceptions.UnsupportedType(f"Unsupported Athena type: {dtype}")