• <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 函数并返回其结果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Running .jl file from R or Python(从 R 或 Python 运行 .jl 文件)
                  Running Julia .jl file in python(在 python 中运行 Julia .jl 文件)
                  Using PIP in a Azure WebApp(在 Azure WebApp 中使用 PIP)
                  How to run python3.7 based flask web api on azure(如何在 azure 上运行基于 python3.7 的烧瓶 web api)
                  Azure Python Web App Internal Server Error(Azure Python Web 应用程序内部服务器错误)
                  Run python dlib library on azure app service(在 azure app 服务上运行 python dlib 库)

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