大数据帧枢轴表
我正在尝试为PABDAS DataFrame制作一个枢轴表,该数据框架的行动范围超过3000万行。
这是我的dataframe pic:
我正在尝试以下pivot_table()
为此:
fundos_bd = bd.pivot_table(index='DT_COMPTC', columns='CNPJ_FUNDO', values='VL_QUOTA')
它有效,但没有处理来自数据框的所有数据。枢纽表上的许多行返回无
值。
一个描述的示例:
这里的 >(在上图上)从我的数据框架中旋转它,它可以按照应有的方式工作。
尝试的groupby()
函数,但也没有起作用。
I am trying to make a pivot table for a Pabdas Dataframe that has more then 30 millions rows.
Here is my dataframe pic:
I am trying the following pivot_table()
for it:
fundos_bd = bd.pivot_table(index='DT_COMPTC', columns='CNPJ_FUNDO', values='VL_QUOTA')
It works but it doesn't process all data from the dataframe. Lots of rows on the pivoted table return None
values.
Here an example of the described:
If I take just the same CNPJ_FUNDO
(on the picture above) from my dataframe and pivot it it works as it should.
Tried groupby()
function but it didn't work either.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论