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

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

    1. <tfoot id='Hq51S'></tfoot>
    2. <small id='Hq51S'></small><noframes id='Hq51S'>

        是否可以从 Julia 调用 Python 函数并返回其结果?

        Is it possible to call a Python function from Julia and return its result?(是否可以从 Julia 调用 Python 函数并返回其结果?)
            <bdo id='jrUR5'></bdo><ul id='jrUR5'></ul>
              <tbody id='jrUR5'></tbody>

              <legend id='jrUR5'><style id='jrUR5'><dir id='jrUR5'><q id='jrUR5'></q></dir></style></legend>

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

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

                1. 本文介绍了是否可以从 Julia 调用 Python 函数并返回其结果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在使用 Python 从网络上抓取数据.我想使用这些数据在 Julia 中运行计算.

                  I am using Python to scrape data from the web. I want to use that data to run calculations in Julia.

                  是否可以在 Julia 中调用该函数并返回其结果,或者我最好只导出到 CSV 并以这种方式加载数据?

                  Is it possible to call the function in Julia and return its result, or am I better off just exporting to a CSV and loading the data in that way?

                  推荐答案

                  当然.请参阅 PyCall.jl.

                  julia> using PyCall
                  
                  julia> @pyimport bs4
                  
                  julia> @pyimport requests
                  
                  julia> r = requests.get("https://stackoverflow.com/questions/46638265");
                  
                  julia> soup = bs4.BeautifulSoup(r.content);
                  
                  julia> soup.title.string
                  "Is it possible to call a Python function from Julia and return its result? - Stack Overflow"
                  
                  julia> soup.select_one(".answercell p").text
                  "Absolutely.  See PyCall.jl."
                  

                  这篇关于是否可以从 Julia 调用 Python 函数并返回其结果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  groupby multiple coords along a single dimension in xarray(在xarray中按单个维度的多个坐标分组)
                  Group by and Sum in Pandas without losing columns(Pandas中的GROUP BY AND SUM不丢失列)
                  Is there a way of group by month in Pandas starting at specific day number?( pandas 有从特定日期开始的按月分组的方式吗?)
                  Group by + New Column + Grab value former row based on conditionals(GROUP BY+新列+基于条件的前一行抓取值)
                  Groupby and interpolate in Pandas(PANDA中的Groupby算法和插值算法)
                  Pandas - Group Rows based on a column and replace NaN with non-null values(PANAS-基于列对行进行分组,并将NaN替换为非空值)

                    <tfoot id='okDQC'></tfoot>

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

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

                          <tbody id='okDQC'></tbody>

                          • <bdo id='okDQC'></bdo><ul id='okDQC'></ul>
                            <legend id='okDQC'><style id='okDQC'><dir id='okDQC'><q id='okDQC'></q></dir></style></legend>