mirror of https://github.com/apache/superset.git
fix(csv): Do not coerce persisted data integer columns to float (#20760)
* Replace pd.DataFrame.from_records with pd.DataFrame * Remove unused code * Update core.py * Update core.py * Update csv.py * Update core.py
This commit is contained in:
parent
8c0ac9017f
commit
e1fd90697c
|
@ -2502,8 +2502,13 @@ class Superset(BaseSupersetView): # pylint: disable=too-many-public-methods
|
||||||
obj = _deserialize_results_payload(
|
obj = _deserialize_results_payload(
|
||||||
payload, query, cast(bool, results_backend_use_msgpack)
|
payload, query, cast(bool, results_backend_use_msgpack)
|
||||||
)
|
)
|
||||||
columns = [c["name"] for c in obj["columns"]]
|
|
||||||
df = pd.DataFrame.from_records(obj["data"], columns=columns)
|
df = pd.DataFrame(
|
||||||
|
data=obj["data"],
|
||||||
|
dtype=object,
|
||||||
|
columns=[c["name"] for c in obj["columns"]],
|
||||||
|
)
|
||||||
|
|
||||||
logger.info("Using pandas to convert to CSV")
|
logger.info("Using pandas to convert to CSV")
|
||||||
else:
|
else:
|
||||||
logger.info("Running a query to turn into CSV")
|
logger.info("Running a query to turn into CSV")
|
||||||
|
|
Loading…
Reference in New Issue