久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <tfoot id='6CCHG'></tfoot>

      <legend id='6CCHG'><style id='6CCHG'><dir id='6CCHG'><q id='6CCHG'></q></dir></style></legend>

        <small id='6CCHG'></small><noframes id='6CCHG'>

        <i id='6CCHG'><tr id='6CCHG'><dt id='6CCHG'><q id='6CCHG'><span id='6CCHG'><b id='6CCHG'><form id='6CCHG'><ins id='6CCHG'></ins><ul id='6CCHG'></ul><sub id='6CCHG'></sub></form><legend id='6CCHG'></legend><bdo id='6CCHG'><pre id='6CCHG'><center id='6CCHG'></center></pre></bdo></b><th id='6CCHG'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='6CCHG'><tfoot id='6CCHG'></tfoot><dl id='6CCHG'><fieldset id='6CCHG'></fieldset></dl></div>
          <bdo id='6CCHG'></bdo><ul id='6CCHG'></ul>
      1. 如何在簡單的 Kivy 應(yīng)用程序中將 Pandas 數(shù)據(jù)框顯示

        How Do I Display a Pandas Dataframe as a table in a simple Kivy App?(如何在簡單的 Kivy 應(yīng)用程序中將 Pandas 數(shù)據(jù)框顯示為表格?)

          <tfoot id='QbhHI'></tfoot>

            • <small id='QbhHI'></small><noframes id='QbhHI'>

                <tbody id='QbhHI'></tbody>
              1. <i id='QbhHI'><tr id='QbhHI'><dt id='QbhHI'><q id='QbhHI'><span id='QbhHI'><b id='QbhHI'><form id='QbhHI'><ins id='QbhHI'></ins><ul id='QbhHI'></ul><sub id='QbhHI'></sub></form><legend id='QbhHI'></legend><bdo id='QbhHI'><pre id='QbhHI'><center id='QbhHI'></center></pre></bdo></b><th id='QbhHI'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='QbhHI'><tfoot id='QbhHI'></tfoot><dl id='QbhHI'><fieldset id='QbhHI'></fieldset></dl></div>
                  <bdo id='QbhHI'></bdo><ul id='QbhHI'></ul>
                  <legend id='QbhHI'><style id='QbhHI'><dir id='QbhHI'><q id='QbhHI'></q></dir></style></legend>
                  本文介紹了如何在簡單的 Kivy 應(yīng)用程序中將 Pandas 數(shù)據(jù)框顯示為表格?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我想構(gòu)建一個簡單的 Kivy 應(yīng)用:

                  I would like to build a simple Kivy app that:

                  1. 要求用戶輸入一個整數(shù) (MTP)
                  2. 要求用戶輸入延遲間隔(delay)
                  3. 在用戶按下提交按鈕后查詢一個url,然后從查詢創(chuàng)建一個顯示的熊貓數(shù)據(jù)框(如表)在 Kivy 應(yīng)用程序的主屏幕上,然后輸出更新數(shù)據(jù)幀,直到 MTP 和延遲間隔結(jié)束

                  我將查詢的所有代碼用作常規(guī) python 程序,我只是不知道如何顯示用戶輸入和輸出數(shù)據(jù)幀(和時間戳).(見下文)

                  I have all the code functioning for the query as a regular python program, I just don't know how to have the user input and the output dataframe (and a time stamp) displayed. (See below)

                  import requests
                  import time
                  from bs4 import BeautifulSoup
                  from datetime import datetime
                  import itertools
                  import pandas as pd
                  
                  mtp = input("Input whole number of minutes to post:") #<-How to do on Kivy Screen
                  delay = input("Enter 15, 30 or 60 second delay:") #<-How to ask on Kivy Screen
                  STP = int(mtp)*60
                  
                  def requestOdds():
                      url = "https://WEBPAGE WITH ODDS DATA.aspx"
                      r = requests.get(url)
                      soup = BeautifulSoup(r.content)
                      stamp = datetime.now().strftime('%m/%d %H:%M:%S')
                      tbPPosts = ('rptOdds_ctl01_tdOdd', 'rptOdds_ctl02_tdOdd','rptOdds_ctl03_tdOdd','rptOdds_ctl04_tdOdd','rptOdds_ctl05_tdOdd','rptOdds_ctl06_tdOdd','rptOdds_ctl07_tdOdd','rptOdds_ctl08_tdOdd','rptOdds_ctl09_tdOdd','rptOdds_ctl10_tdOdd','rptOdds_ctl11_tdOdd','rptOdds_ctl12_tdOdd','rptOdds_ct113_tdOdd','rptOdds_ct114_tdOdd','rptOdds_ct115_tdOdd','rptOdds_ct116_tdOdd','rptOdds_ct117_tdOdd','rptOdds_ct118_tdOdd','rptOdds_ct119_tdOdd','rptOdds_ct120_tdOdd','rptOdds_ct121_tdOdd')
                      mlPPosts = ('rptOdds_ctl01_tdMl','rptOdds_ctl02_tdMl','rptOdds_ctl03_tdMl','rptOdds_ctl04_tdMl','rptOdds_ctl05_tdMl','rptOdds_ctl06_tdMl','rptOdds_ctl07_tdMl','rptOdds_ctl08_tdMl','rptOdds_ctl09_tdOdd','rptOdds_ctl10_tdMl','rptOdds_ctl11_tdMl','rptOdds_ctl12_tdMl','rptOdds_ct113_tdMl','rptOdds_ct114_tdMl','rptOdds_ct115_tdMl','rptOdds_ct116_tdMl', 'rptOdds_ct117_tdMl','rptOdds_ct118_tdMl','rptOdds_ct119_tdMl','rptOdds_ct120_tdMl','rptOdds_ct121_tdMl')
                      trimmed_text=[]
                      trimmed_text2=[]
                      tbodds = []
                      mlodds = []
                      odds = []
                  
                      for horse in tbPPosts:
                          table = soup.find('td', {"odds-table-odd"}, id=horse)
                          if table is not None:
                              text = table.renderContents()
                              trimmed_text = text.strip()
                              tbodds.append(trimmed_text) 
                  
                      for mlhorse in mlPPosts:
                          table2 = soup.find('td', {"odds-table-ml"}, id=mlhorse)
                          if table2 is not None:
                              text2 = table2.renderContents()
                              trimmed_text2 = text2.strip()
                              mlodds.append(trimmed_text2)
                  
                      mlodds = itertools.ifilterfalse(lambda x: x=='', mlodds) #faster
                      tbodds = itertools.ifilterfalse(lambda x: x=='', tbodds)
                      oddsDict = dict(zip(mlodds, tbodds))
                      **odds = pd.DataFrame(list(oddsDict.iteritems()), columns=['ML','TB'])
                      print odds, stamp** #<--How do I get these to print onto the Kivy Screen?
                  
                  def getLiveOdds():
                      interval = 0
                      while interval <= STP:
                          requestOdds()
                          time.sleep(delay)
                          interval +=delay
                  
                  getLiveOdds()
                  

                  任何幫助將不勝感激!

                  推薦答案

                  我發(fā)現(xiàn)了一些可以幫助你的東西:

                  I found out something which could help you :

                  基維文件

                  GraphDraw:
                  
                  <GraphDraw>:
                  
                      BoxLayout:
                          Button:
                              text: "Hello World"
                              on_press: root.graph()
                  

                  邏輯

                  #!/usr/bin/env python
                  # -*- encoding: utf-8
                  
                  import datetime
                  import pandas as pd
                  from kivy.app import App
                  from kivy.uix.boxlayout import BoxLayout
                  import dfgui
                  import pandas as pd
                  
                  
                  class Visualisation(App):
                      pass
                  
                  class GraphDraw(BoxLayout):
                      def graph(self):
                          xls = pd.read_excel('filepath')
                          #df = pd.DataFrame.xls
                          dfgui.show(xls)
                          #print xls
                  
                  if __name__ == '__main__':
                      Visualisation().run()
                  

                  所以您使用 dfgui 可以創(chuàng)建 pandas 數(shù)據(jù)框表,而不是使用 Kivy.查看項目 dfgui:https://github.com/bluenote10/PandasDataFrameGUI

                  So you use dfgui which can create pandas dataframe table instead of using Kivy. See the project dfgui : https://github.com/bluenote10/PandasDataFrameGUI

                  希望對你有幫助:)

                  這篇關(guān)于如何在簡單的 Kivy 應(yīng)用程序中將 Pandas 數(shù)據(jù)框顯示為表格?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  How to make a discord bot that gives roles in Python?(如何制作一個在 Python 中提供角色的不和諧機器人?)
                  Discord bot isn#39;t responding to commands(Discord 機器人沒有響應(yīng)命令)
                  Can you Get the quot;About mequot; feature on Discord bot#39;s? (Discord.py)(你能得到“關(guān)于我嗎?Discord 機器人的功能?(不和諧.py))
                  message.channel.id Discord PY(message.channel.id Discord PY)
                  How do I host my discord.py bot on heroku?(如何在 heroku 上托管我的 discord.py 機器人?)
                  discord.py - Automaticaly Change an Role Color(discord.py - 自動更改角色顏色)

                      • <bdo id='hbfci'></bdo><ul id='hbfci'></ul>

                        <tfoot id='hbfci'></tfoot>
                        <legend id='hbfci'><style id='hbfci'><dir id='hbfci'><q id='hbfci'></q></dir></style></legend>

                          <tbody id='hbfci'></tbody>

                        • <i id='hbfci'><tr id='hbfci'><dt id='hbfci'><q id='hbfci'><span id='hbfci'><b id='hbfci'><form id='hbfci'><ins id='hbfci'></ins><ul id='hbfci'></ul><sub id='hbfci'></sub></form><legend id='hbfci'></legend><bdo id='hbfci'><pre id='hbfci'><center id='hbfci'></center></pre></bdo></b><th id='hbfci'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='hbfci'><tfoot id='hbfci'></tfoot><dl id='hbfci'><fieldset id='hbfci'></fieldset></dl></div>
                          • <small id='hbfci'></small><noframes id='hbfci'>

                            主站蜘蛛池模板: 日韩一级av毛片 | 亚洲精品一区二区在线观看 | 成年人黄色大片 | 欧美日韩视频 | 国产福利91精品一区二区三区 | 免费av不卡 | 中文毛片 | 国产另类xxxxhd高清 | 午夜一区 | 欧美性生活网站 | 亚洲毛片网 | 高清免费av| www欧美 | 国产草草 | 中国久久久 | 免费日韩av| 可以在线观看的av | 国产午夜在线 | 精品国产精品 | 福利视频网址导航 | 激情五月综合色婷婷一区二区 | 国内自拍偷拍视频 | 荤话粗俗h高h重口 | 黄色www. | 亚洲色网址 | 91久久久久| 久久在线精品 | 日日夜夜狠狠操 | 成人激情片| 日韩精品免费一区二区夜夜嗨 | 无套内谢的新婚少妇国语播放 | 中文字幕理论片 | 日韩午夜在线观看 | a毛片在线观看 | 成av人片在线观看www | 超碰成人av | 国产欧美一区二区精品忘忧草 | 福利在线播放 | 亚洲精品乱码久久久久久 | 日韩在线成人 | 男人天堂av网 |