简体   繁体   English

从 python 文件中读取数据到 javascript 文件中

[英]reading data from python file into javascript file

Hi I have been trying to create an application using reactJS which takes a file (.mf4 format ) as input, reads data and plots it.您好我一直在尝试使用 reactJS 创建一个应用程序,该应用程序将文件(.mf4 格式)作为输入,读取数据并绘制它。 But there does not exist any JS librarie for reading data from.mf4 file, however there are python libraries.但是不存在用于从.mf4 文件中读取数据的任何 JS 库,但是有 python 库。

Lets say getdata() is a python function which returns say python dataframe.假设getdata()是一个 python function ,它返回 python Z6A8064B5DF479455500553C47DZ

How can I call getdata() function in JS and get data?如何在 JS 中调用getdata() function 并获取数据?

what are the different ways I can implement this?我可以通过哪些不同的方式来实现这一点?

Export from python to JSON format and read the JSON with React JS Hooks:从 python 导出为 JSON 格式并使用 React JS Hooks 读取 JSON:

https://blog.nubecolectiva.com/como-mostrar-datos-mediante-hooks-con-react-js-16-12/ https://blog.nubecolectiva.com/como-mostrar-datos-mediante-hooks-con-react-js-16-12/

In you front you can use Chart JS or other library.在您前面,您可以使用 Chart JS 或其他库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM