Closed oceandlr closed 5 years ago
Set the 'unique' keyword parameter to True to return only the 1st result if the index contains duplicates. For example: src.select(['jobid'], from = ['meminfo_E5-2698'], order_by = 'job_id', unique = True)
ok ill give that a try -- thanks!
Is there a select call that supports something like: select distinct 'job_id' from.....
I would like to see how many unique job_id's I have in my dataset. Is there a better option than: In [8]: src.select(['jobid'],from = ['meminfo_E5-2698'],order_by = 'job_id')
In [9]: dst = src.get_results()
In [10]: myset = set(dst.array('job_id'))
In [11]: print(myset) set([0.0, 5078835.0])