You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/04/05 20:30:18 UTC

[GitHub] [superset] pavlozt commented on issue #11658: Numeric columns in pivot table when using postgresql

pavlozt commented on issue #11658:
URL: https://github.com/apache/superset/issues/11658#issuecomment-813631796


   I reproduce this with latest git master branch, mysql mysql  10.3.27-MariaDB
   with simple sql:
   create table piv_table( i int(11) primary key auto_increment, dim_a int(11),dim_b int(11), val int(11));
   insert into piv_table  (dim_a,dim_b,val) values (10,10,1000),(10,10,1000),(10,20,1000),(20,20,1000);
   
   doing pivot with dim_a , dim_b, sum()
   
   ![изображение](https://user-images.githubusercontent.com/55258742/113623182-adb3bb80-9666-11eb-8d1c-9959f006cea8.png)
   
   
   add some debug code to get_aggfunc():
   
   logger.info("df.dtypes:",df.dtypes)
   
   it outputs :
   
   Message: 'df.dtypes:'
   Arguments: (dim_a        int64
   dim_b        int64
   SUM(val)    object
   dtype: object,)
   
   
   Whats wrong with this code ? where did the object data type come from ?
   of course, in clean pandas code no object types with this query.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org