Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make the syntax compatible with pandas #2

Open
arita37 opened this issue Apr 21, 2023 · 7 comments
Open

make the syntax compatible with pandas #2

arita37 opened this issue Apr 21, 2023 · 7 comments

Comments

@arita37
Copy link

arita37 commented Apr 21, 2023

Thansk for good work !

in order to increase user based
and facilitate user migration,
please make the syntax one to one match with pandas:

Pd.read_csv(…)

check koalas library

@hkpeaks
Copy link
Owner

hkpeaks commented Apr 22, 2023

you can see this example

To support Python:

import peaks as hk

Table = hk.ReadFile("10MillionRows.csv")
Table2 = hk.Distinct("Table | Ledger, Account, PartNo,Project,Contact,Unit Code, D/C,Currency")
FilePath = hk.WriteFile("Table2 | * ~ Peaks-Distinct10.csv")
FilePath2 = hk.WriteFile("Table | Ledger, Account, PartNo,Project,Contact ~ Peaks-Transaction.csv")

where Table is variable which contain a in-memory table, FilePath is a string variable
File type is auto detected by .ext and its bytearray, so no need _csv

To support Web request and Windows/Linux command line (can be ran by script and command line):

ReadFile{10MillionRows.csv ~ Table}
Distinct{Ledger, Account, PartNo,Project,Contact,Unit Code, D/C,Currency ~ Table2}
WriteFile{Table2 | * ~ Peaks-Distinct10.csv}
WriteFile{Table | Ledger, Account, PartNo,Project,Contact ~ Peaks-Transaction.csv}

where the Python Code (" ") is equvalent to the original syntax {}.
And "variable =" is equvalent to the original syntax "~ TableName"
When output table is a file name instead of in-memory table, the variable
will be a string which contain a full file path of the output file.

@arita37
Copy link
Author

arita37 commented Apr 22, 2023 via email

@hkpeaks
Copy link
Owner

hkpeaks commented Apr 22, 2023

Need to provide a clear naming, and I will request Pandas and Polars to follow the spec of Peaks Framework, to standarsize ETL expression similar to HTML5. And there are room different software developers joining together to create a standardize ETL expression. If only command ReadFile -> Read obviously not an issue, but there are a lot of other ETL expressions. You can have a look on this doc "WebNameSQL.pdf".

@arita37
Copy link
Author

arita37 commented Apr 22, 2023 via email

@hkpeaks
Copy link
Owner

hkpeaks commented Apr 22, 2023

CSV is one of the formats that any dataframe software supports. Other formats include Parquet, Excel, JSON, HTML and more. However, this software is not intended to be another Polars or Pandas. The benchmark test will mainly focus on some of the most common ETL functions such as ReadFile, Select, Distinct, GroupBy, JoinTable, OrderBy, AddColumn, Crosstab and WriteFile. Other functions will be significantly different from Polars or Pandas. Peaks is derived from my previous experience of accounting software and will be extended to support bioinformatics.

You should be an excellent user. Polars is one of my best recommended dataframe software.

@arita37
Copy link
Author

arita37 commented Apr 22, 2023 via email

@hkpeaks
Copy link
Owner

hkpeaks commented Apr 22, 2023

Polars is one of excellent software for you. I shall introduce it for more friends and companies. In fact I have learnt a lot from Polars. I enjoy using it for testing. Previously I reported issues for billion rows testing, subquently the author fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants