javascriptdata / 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.
https://danfo.jsdata.org/
MIT License
4.79k stars 209 forks source link

webpack required on browser #134

Closed reacharound closed 3 years ago

reacharound commented 3 years ago

Describe the bug I copied the code from the Getting Started page here (https://danfo.jsdata.org/getting-started) under the '10 minutes to danfo.js' from the Browser section. I got "TypeError: t is null o https://cdn.jsdelivr.net/npm/danfojs@0.2.2/lib/bundle.min.js:6 89810 https://cdn.jsdelivr.net/npm/danfojs@0.2.2/lib/bundle.min.js:6 webpack_require https://cdn.jsdelivr.net/npm/danfojs@0.2.2/lib/bundle.min.js:6 " repeating for a while, ending with " 52839 https://cdn.jsdelivr.net/npm/danfojs@0.2.2/lib/bundle.min.js:6 webpack_require https://cdn.jsdelivr.net/npm/danfojs@0.2.2/lib/bundle.min.js:6 dfd https://cdn.jsdelivr.net/npm/danfojs@0.2.2/lib/bundle.min.js:6

https://cdn.jsdelivr.net/npm/danfojs@0.2.2/lib/bundle.min.js:6" I tried to install webpack but there is no browser installation. I am a noob so sorry if this is unhelpful but this is the only place I could find to ask for help. Looks like no data manipulation for me, wah-wah. Same error if I run the previous code from that page, the one without the 'print' command. **Desktop (please complete the following information):** - OS: Windows 7 - Browser Firefox 86.0
risenW commented 3 years ago

Hi @reacharound Where are you trying to run danfo from? The browser?

If yes, then try the updated version of danfojs (v0.2.3):

Here's an example:

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdn.jsdelivr.net/npm/danfojs@0.2.3/lib/bundle.min.js"></script>
</head>

<body>

    <script>

      //danfo is exposed on dfd namespace 
      s = new dfd.Series([1,2,3,4,5]) 
      s.print()
    </script>

</body>

</html>
reacharound commented 3 years ago

That is the exact code I entered, which returned the initially mentioned error.

Yes I was installing on browser, Firefox 86.0