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

    1. <legend id='ab1R1'><style id='ab1R1'><dir id='ab1R1'><q id='ab1R1'></q></dir></style></legend>

      • <bdo id='ab1R1'></bdo><ul id='ab1R1'></ul>
      <tfoot id='ab1R1'></tfoot>

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

        <small id='ab1R1'></small><noframes id='ab1R1'>

      2. 從數據框中獲取價值

        get value out of dataframe(從數據框中獲取價值)

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

                  <small id='YLpiW'></small><noframes id='YLpiW'>

                1. 本文介紹了從數據框中獲取價值的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  在 Scala 中,我可以使用 get(#)getAs[Type](#) 從數據幀中獲取值.在 pyspark 中應該怎么做?

                  In Scala I can do get(#) or getAs[Type](#) to get values out of a dataframe. How should I do it in pyspark?

                  我有一個兩列 DataFrame:item(string)salesNum(integers).我做了一個 groupbymean 來獲得這些數字的平均值,如下所示:

                  I have a two columns DataFrame: item(string) and salesNum(integers). I do a groupby and mean to get a mean of those numbers like this:

                  saleDF.groupBy("salesNum").mean()).collect()

                  它有效.現在我在一個數據框中有了一個平均值.

                  and it works. Now I have the mean in a dataframe with one value.

                  如何從數據框中獲取該值以獲取浮點數的平均值?

                  How can I get that value out of the dataframe to get the mean as a float number?

                  推薦答案

                  collect() 將結果作為 python 列表返回.要從列表中取出值,您只需要像這樣獲取第一個元素:

                  collect() returns your results as a python list. To get the value out of the list you just need to take the first element like this:

                  saleDF.groupBy("salesNum").mean()).collect()[0] 
                  

                  這篇關于從數據框中獲取價值的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  How to bind a function to an Action from Qt menubar?(如何將函數綁定到 Qt 菜單欄中的操作?)
                  PyQt progress jumps to 100% after it starts(PyQt 啟動后進度躍升至 100%)
                  How to set yaxis tick label in a fixed position so that when i scroll left or right the yaxis tick label should be visible?(如何將 yaxis 刻度標簽設置在固定位置,以便當我向左或向右滾動時,yaxis 刻度標簽應該可見
                  `QImage` constructor has unknown keyword `data`(`QImage` 構造函數有未知關鍵字 `data`)
                  Change x-axis ticks to custom strings(將 x 軸刻度更改為自定義字符串)
                  How to show progress bar while saving file to excel in python?(如何在python中將文件保存為excel時顯示進度條?)

                      <bdo id='o4tJU'></bdo><ul id='o4tJU'></ul>

                      • <legend id='o4tJU'><style id='o4tJU'><dir id='o4tJU'><q id='o4tJU'></q></dir></style></legend>

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

                            <small id='o4tJU'></small><noframes id='o4tJU'>

                              <tbody id='o4tJU'></tbody>

                            主站蜘蛛池模板: 日韩av第一页 | 欧美精品一区二区蜜桃 | 亚洲成人免费视频在线 | 日韩精品一区二区久久 | 国产精品大全 | 久久久久久高潮国产精品视 | 亚洲3p| 亚洲激情一级片 | 国产农村妇女精品一区 | 国产欧美在线视频 | 国产精品久久久久久久久久软件 | 中文字幕成人 | 国产精品伦一区二区三级视频 | 草草视频在线播放 | 免费一区 | av一区二区三区 | cao视频| 欧美在线一区二区三区 | 91观看| 免费在线观看一区二区三区 | 日韩亚洲视频 | 毛片网站在线观看 | 国产精品视频偷伦精品视频 | 性国产丰满麻豆videosex | 日本福利片 | av中文字幕在线观看 | 青青久草| 国产99免费 | 九九热免费在线观看 | 国产美女黄色 | 四虎影院新地址 | 欧美成人精品一区二区三区 | 欧美成人精品一区二区男人看 | 久精品久久 | 欧美激情精品久久久久久变态 | 国产一区二区电影网 | 国产精品久久久久一区二区 | 免费高清成人 | 久久精品福利视频 | 国产一区久久 | 成人高清网站 |