python中的数据表排序? [英] datatable sorting in iron python?

查看:89
本文介绍了python中的数据表排序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在铁蟒蛇中有一个dtdtable

I have a dtdtable in iron python

 dttable = handler.GetDataTable(); 

我为

 v=dttable.defaultview

那么我该如何使用Iron python对这个dttable进行排序?

so how do i sort this dttable using iron python ?

推荐答案

dv = dttable.DefaultView
dv.Sort="TOP ASC"
dttable = dv.ToTable()

我使用以上几行在python钢铁中对数据表进行了排序,并且工作正常.顶部"是列名,ASC是按升序对表进行排序

I used the above lines to sort a data table in iron python and It worked fine ."Top" is the column name , and ASC is to sort the table in ascending order

这篇关于python中的数据表排序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆