Using Danfojs in React
TL:DR See Example react application using danfojs here
Danfojs works for both browser and NodeJs environment, and as such is available to frontend frameworks like React and Vue.
In order to use Danfojs in a library like React, you must install the browser side version from npm.
Follow the steps here to bootstrap a React app, and in your App.js or any file where you want to use danfojs, you can import it as follow:
Now you have access to all features under the dfd
namespace. Below is a sample App.js file using danfojs:
On running the app, we get the following output in the console:
Note that you can also import specific modules. For instance, in the code below we import only the DataFrame module:
Following these steps, you can use danfojs in any client-side library.
Last updated