久久久久久久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 應用程序中將 Pandas 數據框顯示

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

          <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 應用程序中將 Pandas 數據框顯示為表格?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我想構建一個簡單的 Kivy 應用:

                  I would like to build a simple Kivy app that:

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

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

                  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()
                  

                  任何幫助將不勝感激!

                  推薦答案

                  我發現了一些可以幫助你的東西:

                  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 可以創建 pandas 數據框表,而不是使用 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

                  希望對你有幫助:)

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

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

                  相關文檔推薦

                  How to make a discord bot that gives roles in Python?(如何制作一個在 Python 中提供角色的不和諧機器人?)
                  Discord bot isn#39;t responding to commands(Discord 機器人沒有響應命令)
                  Can you Get the quot;About mequot; feature on Discord bot#39;s? (Discord.py)(你能得到“關于我嗎?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'>

                            主站蜘蛛池模板: 久久999| 国产精品2区 | 国产精品久久久久久久久久免费看 | 91精品国产麻豆 | 国产精品一区二区久久 | 一区二区三区精品在线 | 亚洲福利视频一区二区 | 国产在线精品一区二区三区 | h视频免费看 | 国产精品99久久久精品免费观看 | 国产欧美精品在线观看 | 精品一区二区三区中文字幕 | 亚洲瑟瑟 | 久久精品 | 久久精品中文 | 日韩在线欧美 | 欧美专区日韩专区 | 亚洲免费成人 | 午夜噜噜噜| 91久久北条麻妃一区二区三区 | 亚洲风情在线观看 | 韩国精品在线 | 五月激情婷婷网 | 黄色a视频 | 日韩久草 | 91av免费版 | 精品国产精品三级精品av网址 | 黄色片网此 | 久久久国产一区 | 国产精品揄拍一区二区久久国内亚洲精 | 天天插天天狠天天透 | 久久国内精品 | 日韩精品一区二区三区中文在线 | 精品国产一区二区三区久久影院 | 亚洲久视频| 国产精品亚洲一区 | 欧美久久精品 | 欧美一二三 | 精品一区二区三区四区五区 | 久久av综合| 91视频网址|