Skip to content

Commit ebebc0f

Browse files
risenWgitbook-bot
authored andcommitted
GitBook: [#216] No subject
1 parent 1ce2b8d commit ebebc0f

File tree

1 file changed

+9
-32
lines changed

1 file changed

+9
-32
lines changed

examples/migrating-to-the-stable-version-of-danfo.js.md

+9-32
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,11 @@ We recently released the first stable version of Danfo.js. See release note here
1010

1111
The following list summarizes some of these updates:
1212

13-
* **Typescript support:** This new version has been completely re-written using Typescript. This means we now have well-defined types that increases the developer experience. 
14-
* **Standard naming convention:** Functions, methods, classes, and variable names have been standardized to follow JavaScript best practices. 
15-
* Standardize function argument: Functions and methods have been updated to accept arguments and parameters intuitively resulting in improved developer experience. 
13+
* **Typescript support:** This new version has been completely re-written using Typescript. This means we now have well-defined types that increase the developer experience.
14+
* **Standard naming convention:** Functions, methods, classes, and variable names have been standardized to follow JavaScript best practices.
15+
* Standardize function argument: Functions and methods have been updated to accept arguments and parameters intuitively resulting in improved developer experience.
1616
* **New features**: We added lots of new features which users have been requesting for. For example:
1717
* Stream and process large CSV data
18-
* Read JSON objects with key support
19-
* Date time is now a first-class data type.
2018
* General bug fixes and improvements
2119
* Better error messages
2220

@@ -34,15 +32,15 @@ to_json ==> toCSV
3432
drop_duplicates ==> dropDuplicates
3533
```
3634

37-
**Note:** that your code editor auto-complete will general suggest the new function or method names, so it will be easier to update to the new names. If using Typescript, then it is even easier as the TS compiler will show you warnings. 
35+
**Note:** that your code editor auto-complete will general suggest the new function or method names, so it will be easier to update to the new names. If using Typescript, then it is even easier as the TS compiler will show you warnings.
3836

3937
### Functions and Methods argument structure
4038

4139
Another major breaking change of v1, is that the structure of arguments/parameters in most functions has been updated to be more intuitive.
4240

4341
In general, it is important to understand our thought process behind this, so, here goes:
4442

45-
Assuming we take the method called _**rename**_, which takes required object mapper, as well as, optional configuration argument. In pre-v1 version of Danfojs, the function signature is as follows:
43+
Assuming we take the method called _**rename**_, which takes required object mapper, as well as, optional configuration argument. In pre-v1 version of Danfojs, the function signature is as follows:
4644

4745
```
4846
rename( { mapper, axis, inplace } ) => DataFrame
@@ -54,39 +52,18 @@ The structure above combines both required and optional arguments as a single ob
5452
rename(mapper, options: {axis, inplace}) //where mapper is required, and options argument is optional.
5553
```
5654

57-
Re-designing functions and methods to follow this intuitive format is the bulk of the breaking change in this new version, as such, when migrating, you have to make these updates. 
55+
Re-designing functions and methods to follow this intuitive format is the bulk of the breaking change in this new version, as such, when migrating, you have to make these updates.
5856

5957
{% hint style="info" %}
60-
If using Typescript, then the TS compiler will help in migration, else, you have to manually identify and update your function/method signature. 
58+
If using Typescript, then the TS compiler will help in migration, else, you have to manually identify and update your function/method signature.
6159
{% endhint %}
6260

6361
### Axis Order
6462

6563
In this new version, we have flipped the result of the axis ordering for all operations. This ordering is now consistent with Pandas and Tensorflow.js. That is, the axis row (0), represents the operations carried out horizontally on a DataFrame, and the axis columns (1) represent operations carried out vertically down the DataFrame.
6664

6765
{% hint style="info" %}
68-
In short, when migrating to the new version, you should flip the axis number so as to get the same result. That is, change all `axis: 0` to `axis: 1`, to get the same result. 
66+
In short, when migrating to the new version, you should flip the axis number so as to get the same result. That is, change all `axis: 0` to `axis: 1`, to get the same result.
6967
{% endhint %}
7068

71-
All examples in this doc have been updated to reflect this update. 
72-
73-
74-
75-
76-
77-
78-
79-
80-
81-
82-
83-
84-
85-
86-
87-
88-
89-
90-
91-
92-
69+
All examples in this doc have been updated to reflect this update.

0 commit comments

Comments
 (0)