Questions tagged [danfojs]

Danfo.js is an open-source, JavaScript library providing high-performance, intuitive, and easy-to-use data structures for manipulating and processing structured data.

Webpage: https://danfo.jsdata.org/

28 questions
0
votes
0 answers

Tensorflow.js----- Error: Size(224) must match the product of shape 7

I tried below tutorial to create and train a model, but got tuck. link: https://danfo.jsdata.org/examples/titanic-survival-prediction-using-danfo.js-and-tensorflow.js Here is the code: async function load_process_data() { let df = await…
0
votes
0 answers

Use multiple rows as column header for danfo

My excel table looks like this: Excel file Snip I exported it as CSV file. and it looks like this: CSV file snip I read this csv file using below method: const dfd = require("danfojs"); var df; df =…
Naino
  • 3
  • 2
0
votes
0 answers

Transposition using multiple merges (feedback wanted)

i have a solution in danfojs (codepen below) but would like some feedback on how to improve it, since im new to danfo, maybe the same result can be obtained more elegantly. Essentially i want to do a transposition by merging around twenty…
dotmindlabs
  • 778
  • 1
  • 12
  • 35
0
votes
0 answers

How to assign the DataFrame, created in an async function which reads a csv file using danfo.js, to a global variable outside of this async function?

[What I want to do] use danfo.js to read a csv file from a url assign the danfo.js DataFrame (similar to that in pandas) as created above to a global variable, so that I can use it somewhere else for other purpose, such as plotting charts. [What I…
oat
  • 1
0
votes
0 answers

Danfo.js in Node.js AWS Lambda function

Is there a way to use danfo.js with AWS lambda? When I zip the node_modules with the node.js code, it's over the 50MB limit.
0
votes
0 answers

"Error resolving module specifier" danfojs

I was able to use danfojs using However, the .js file is too big (over 6MB) for production so I need some help with dead code elimination. I read that webpack's…
corbyn3
  • 77
  • 4
0
votes
0 answers

Danfo.js - Skiprows? (Is This Available for danfo.readCSV?)

Is there an available option with Danfo's danfo.readCSV to skiprows like in Pandas? I checked out https://danfo.jsdata.org/api-reference/input-output/danfo.read_csv / looked a bunch online, but haven't found anything...
jmelm93
  • 145
  • 1
  • 10
0
votes
0 answers

Building a basic backesting app to backtest trading signals using javascript

I have historical timeseries data that has a datetime and a closing price that looks like this: 2022-09-01 00:00, 142.3770000 2022-09-01 00:01, 142.3660000 2022-09-01 00:02, 142.350000 2022-09-01 00:03, 142.3470000 2022-09-01 00:04, …
Hazza
  • 1
  • 2
0
votes
1 answer

training a model using TensorFlow js. Accuracy not changing along the training and loss is not showing

I'm trying to train a model using "binaryCrossentropy" loss. But all I get when printing out loss and accuracy is : loss :NaN. And accuracy is 59.93 (does not change over training). Any ideas what could be the reason? Here is the code: const df =…
0
votes
1 answer

Danfo JS problem reading Excel file, works with CSV

I am trying to read a folder with csv and excel files with nodeJS and danfoJS. Using danfoJS I have no problem reading the csv files but for the .xlsx files I am getting this error: Error: ParamError: File not supported. file must be a url or an…
userRR
  • 309
  • 3
  • 14
0
votes
2 answers

How to merge complex data frames in pandas/dataframe-js/etc

I would imagine what I'm trying to do is fairly simple in pandas but I just can't get it. Really I want to do this in dataframe-js (or danfojs) but any help in either pandas or dataframe-js will be helpful. Essentially: there can be an array of any…
André
  • 380
  • 4
  • 9
0
votes
1 answer

How to save a tensor

I have a dataset of 1000 items. I normalize the data before I train the model against it. I would now like to use the model to make predictions. However, from what I understand, I need to normalize the inputs that I will feed to the model for which…
callmekatootie
  • 10,989
  • 15
  • 69
  • 104
0
votes
1 answer

Is it possible to feed a Danfojs Series object to D3js data() binding method?

I created a Series object from my data, like so: But I don't know how to actually implement the Series object to scale and bind the data, here is my code: function render(svg) { // const xValue = d => d['Population (2020)']; // const yValue…
Ricardo Sanchez
  • 4,935
  • 11
  • 56
  • 86
1
2