1
我對如何找到最活躍和最不活躍的客戶有疑問。Python:計算最多和最不活躍的客戶
我們被給了一組不同的名字。例如"sam, sam, luke, luke, luke"
我們被要求使用python(spyder)查找最常用的名稱和最不頻繁的名稱。這些結果需要在wxFormBuilder
的框中反映。
我不確定我應該做什麼。
這裏是我迄今爲止爲尋找最活躍的客戶:
def mostactive(self,parent):
for name in range (self.m_listBox1.GetCount()): <--- the name of the box is m_listBox1
mostactivecustomer=str(self.m_listBox1.GetString(name))
self.m_textCtrl2.Value(mostactivecustomer) <---- the result box is called m_textCtrl2
謝謝!
我們(希望)不會爲你做你的功課。你怎麼試圖解決這個問題? – Ideasthete 2014-09-30 18:11:08