Skip to content

Commit

Permalink
[Utils] Naming corrections (#1334)
Browse files Browse the repository at this point in the history
* [Utils] Naming corrections

 - fixing some wrong naming.

* black

* colors correction

* Update importance.py
  • Loading branch information
oualib authored Nov 6, 2024
1 parent 64e25ef commit 487b84e
Show file tree
Hide file tree
Showing 35 changed files with 142 additions and 121 deletions.
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [2018] Microfocus
Copyright [2018-2025] Open Text

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ selected_titanic.groupby(columns=["pclass"], expr=["AVG(AVG)"])

### Charts

Verticapy comes integrated with three popular plotting libraries: matplotlib, highcharts, and plotly.
VerticaPy comes integrated with three popular plotting libraries: matplotlib, highcharts, and plotly.

A gallery of VerticaPy-generated charts is available at:<br>

Expand Down Expand Up @@ -367,7 +367,7 @@ set_option("sql_on", True)

```sql
SELECT
    /*+LABEL('vDataframe._aggregate_matrix')*/ CORR_MATRIX("pclass", "survived", "age", "sibsp", "parch", "fare", "body") OVER ()  
    /*+LABEL('vDataFrame._aggregate_matrix')*/ CORR_MATRIX("pclass", "survived", "age", "sibsp", "parch", "fare", "body") OVER ()  
FROM
(
SELECT
Expand Down
2 changes: 1 addition & 1 deletion docs/source/contribution_guidelines_code_auto_doc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Install the requirements by: 
Install Verticapy from the setup file using below in the VerticaPy directory
Install VerticaPy from the setup file using below in the VerticaPy directory

.. code-block::
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Vertica database using the Python programming language. Vertica is a high-perfor
:class-card: custom-card-2
:class-img-top: custom-class-img-top

Quick and easy guide to help you install Verticapy.
Quick and easy guide to help you install VerticaPy.

+++
Install VerticaPy
Expand Down
4 changes: 2 additions & 2 deletions docs/source/pipeline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ To begin, you must:

* Have access to a machine that has Vertica installed
* Install Python on your machine
* Install Verticapy
* Install VerticaPy

Create Your First YAML files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -30,7 +30,7 @@ Create Your First YAML files
- the files should have **.yaml** as the extension,
- YAML does not allow the use of tabs while creating YAML files

The information in connection.yaml will be the same you use in Verticapy.
The information in connection.yaml will be the same you use in VerticaPy.

.. code:: bash
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user_guide_full_stack_dblink_integration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ Let's try an example with the :py:func:`~verticapy.vDataFrame.describe` function
-- Computing the descriptive statistics of all numerical columns using SUMMARIZE_NUMCOL
SELECT
/*+LABEL('vDataframe.describe')*/ SUMMARIZE_NUMCOL("LATITUDE", "LONGITUDE") OVER ()
/*+LABEL('vDataFrame.describe')*/ SUMMARIZE_NUMCOL("LATITUDE", "LONGITUDE") OVER ()
FROM (
SELECT
"IATA_CODE",
Expand Down Expand Up @@ -676,7 +676,7 @@ We can now perform the same query involving the three tables:
Conclusion
-----------

With the combination of Verticapy and ``DBLINK``, we can now work with multiple datasets stored in different databases. We can work simultaneously with external tables, Vertica tables, and Pandas DataFrame in a **single query**! There is no need to materialize the table before use because it's all taken care of in the background.
With the combination of VerticaPy and ``DBLINK``, we can now work with multiple datasets stored in different databases. We can work simultaneously with external tables, Vertica tables, and Pandas DataFrame in a **single query**! There is no need to materialize the table before use because it's all taken care of in the background.

The cherry on the cake is the ease-of-use that is enabled by VerticaPy and its Python-like syntax.

Expand Down
4 changes: 2 additions & 2 deletions docs/source/user_guide_introduction_vdf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ We can also view the vDataFrame's backend SQL code generation by setting the ``s
-- Computing the different aggregations
SELECT
/*+LABEL('vDataframe.aggregate')*/
/*+LABEL('vDataFrame.aggregate')*/
APPROXIMATE_COUNT_DISTINCT("cnt")
FROM (
SELECT
Expand Down Expand Up @@ -268,7 +268,7 @@ We can also view the vDataFrame's backend SQL code generation by setting the ``s
-- Computing the descriptive statistics of all numerical columns using SUMMARIZE_NUMCOL
SELECT
/*+LABEL('vDataframe.describe')*/
/*+LABEL('vDataFrame.describe')*/
SUMMARIZE_NUMCOL("cnt") OVER ()
FROM (
SELECT
Expand Down
4 changes: 2 additions & 2 deletions examples/learn/titanic/titanic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3177,7 +3177,7 @@
{
"data": {
"text/html": [
" &emsp; SELECT <br> &emsp; &emsp; /*+LABEL('vDataframe.aggregate')*/ 2.28444084278768, <br> &emsp; &emsp; 0.364667747163695, <br> &emsp; &emsp; AVG(\"sex\"), <br> &emsp; &emsp; AVG(\"age\"), <br> &emsp; &emsp; 0.504051863857374, <br> &emsp; &emsp; 0.378444084278768, <br> &emsp; &emsp; AVG(\"fare\"), <br> &emsp; &emsp; 0.355753646677472, <br> &emsp; &emsp; AVG(\"family_size\") &emsp; <br> &emsp; FROM <br> ( <br> &emsp; SELECT <br> &emsp; &emsp; \"pclass\", <br> &emsp; &emsp; \"survived\", <br> &emsp; &emsp; \"name\", <br> &emsp; &emsp; \"sex\", <br> &emsp; &emsp; COALESCE(\"age\", AVG(\"age\") OVER (PARTITION BY \"pclass\", \"sex\")) AS \"age\", <br> &emsp; &emsp; \"sibsp\", <br> &emsp; &emsp; \"parch\", <br> &emsp; &emsp; \"fare\", <br> &emsp; &emsp; \"boat\", <br> &emsp; &emsp; \"family_size\" &emsp; <br> &emsp; FROM <br> ( <br> &emsp; SELECT <br> &emsp; &emsp; \"pclass\", <br> &emsp; &emsp; \"survived\", <br> &emsp; &emsp; REGEXP_SUBSTR(\"name\", ' ([A-Za-z]+)\\.') AS \"name\", <br> &emsp; &emsp; DECODE(\"sex\", 'female', 0, 'male', 1, 2) AS \"sex\", <br> &emsp; &emsp; \"age\", <br> &emsp; &emsp; \"sibsp\", <br> &emsp; &emsp; \"parch\", <br> &emsp; &emsp; (CASE WHEN \"fare\" < -176.6204982585513 THEN -176.6204982585513 WHEN \"fare\" > 244.5480856064831 THEN 244.5480856064831 ELSE \"fare\" END) AS \"fare\", <br> &emsp; &emsp; DECODE(\"boat\", NULL, 0, 1) AS \"boat\", <br> &emsp; &emsp; ((\"parch\") + (\"sibsp\")) + (1) AS \"family_size\" &emsp; <br> &emsp; FROM <br> ( &emsp; <br> &emsp; SELECT <br> &emsp; &emsp; \"pclass\", <br> &emsp; &emsp; \"survived\", <br> &emsp; &emsp; \"name\", <br> &emsp; &emsp; \"sex\", <br> &emsp; &emsp; \"age\", <br> &emsp; &emsp; \"sibsp\", <br> &emsp; &emsp; \"parch\", <br> &emsp; &emsp; \"fare\", <br> &emsp; &emsp; \"boat\" &emsp; <br> &emsp; FROM <br> \"public\".\"titanic\") &emsp; <br>VERTICAPY_SUBTABLE) &emsp; <br>VERTICAPY_SUBTABLE) &emsp; <br>VERTICAPY_SUBTABLE &emsp; <br> &emsp; LIMIT 1"
" &emsp; SELECT <br> &emsp; &emsp; /*+LABEL('vDataFrame.aggregate')*/ 2.28444084278768, <br> &emsp; &emsp; 0.364667747163695, <br> &emsp; &emsp; AVG(\"sex\"), <br> &emsp; &emsp; AVG(\"age\"), <br> &emsp; &emsp; 0.504051863857374, <br> &emsp; &emsp; 0.378444084278768, <br> &emsp; &emsp; AVG(\"fare\"), <br> &emsp; &emsp; 0.355753646677472, <br> &emsp; &emsp; AVG(\"family_size\") &emsp; <br> &emsp; FROM <br> ( <br> &emsp; SELECT <br> &emsp; &emsp; \"pclass\", <br> &emsp; &emsp; \"survived\", <br> &emsp; &emsp; \"name\", <br> &emsp; &emsp; \"sex\", <br> &emsp; &emsp; COALESCE(\"age\", AVG(\"age\") OVER (PARTITION BY \"pclass\", \"sex\")) AS \"age\", <br> &emsp; &emsp; \"sibsp\", <br> &emsp; &emsp; \"parch\", <br> &emsp; &emsp; \"fare\", <br> &emsp; &emsp; \"boat\", <br> &emsp; &emsp; \"family_size\" &emsp; <br> &emsp; FROM <br> ( <br> &emsp; SELECT <br> &emsp; &emsp; \"pclass\", <br> &emsp; &emsp; \"survived\", <br> &emsp; &emsp; REGEXP_SUBSTR(\"name\", ' ([A-Za-z]+)\\.') AS \"name\", <br> &emsp; &emsp; DECODE(\"sex\", 'female', 0, 'male', 1, 2) AS \"sex\", <br> &emsp; &emsp; \"age\", <br> &emsp; &emsp; \"sibsp\", <br> &emsp; &emsp; \"parch\", <br> &emsp; &emsp; (CASE WHEN \"fare\" < -176.6204982585513 THEN -176.6204982585513 WHEN \"fare\" > 244.5480856064831 THEN 244.5480856064831 ELSE \"fare\" END) AS \"fare\", <br> &emsp; &emsp; DECODE(\"boat\", NULL, 0, 1) AS \"boat\", <br> &emsp; &emsp; ((\"parch\") + (\"sibsp\")) + (1) AS \"family_size\" &emsp; <br> &emsp; FROM <br> ( &emsp; <br> &emsp; SELECT <br> &emsp; &emsp; \"pclass\", <br> &emsp; &emsp; \"survived\", <br> &emsp; &emsp; \"name\", <br> &emsp; &emsp; \"sex\", <br> &emsp; &emsp; \"age\", <br> &emsp; &emsp; \"sibsp\", <br> &emsp; &emsp; \"parch\", <br> &emsp; &emsp; \"fare\", <br> &emsp; &emsp; \"boat\" &emsp; <br> &emsp; FROM <br> \"public\".\"titanic\") &emsp; <br>VERTICAPY_SUBTABLE) &emsp; <br>VERTICAPY_SUBTABLE) &emsp; <br>VERTICAPY_SUBTABLE &emsp; <br> &emsp; LIMIT 1"
],
"text/plain": [
"<IPython.core.display.HTML object>"
Expand Down Expand Up @@ -3258,7 +3258,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's move on to modeling our data. Save the vDataframe to your Vertica database."
"Let's move on to modeling our data. Save the vDataFrame to your Vertica database."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion verticapy/_config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ def set_option(key: str, value: Any = None) -> None:
**Computing the different aggregations**.
SELECT /*+LABEL('vDataframe.aggregate')*/ MAX("age") FROM "public"."titanic" LIMIT 1
SELECT /*+LABEL('vDataFrame.aggregate')*/ MAX("age") FROM "public"."titanic" LIMIT 1
**Execution**: 0.072s
Expand Down
16 changes: 8 additions & 8 deletions verticapy/core/vdataframe/_aggregate.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ def aggregate(
res = _executeSQL(
query=f"""
SELECT
/*+LABEL('vDataframe.aggregate')*/
/*+LABEL('vDataFrame.aggregate')*/
{", ".join([str(item) for sublist in agg for item in sublist])}""",
print_time_sql=False,
method="fetchrow",
Expand All @@ -601,7 +601,7 @@ def aggregate(
res = _executeSQL(
query=f"""
SELECT
/*+LABEL('vDataframe.aggregate')*/
/*+LABEL('vDataFrame.aggregate')*/
{", ".join([str(item) for sublist in agg for item in sublist])}
FROM {self}
LIMIT 1""",
Expand Down Expand Up @@ -642,7 +642,7 @@ def aggregate(
query = f"""
WITH vdf_table AS
(SELECT
/*+LABEL('vDataframe.aggregate')*/ *
/*+LABEL('vDataFrame.aggregate')*/ *
FROM {self}) {query}"""
if nb_precomputed == len(func) * len(columns):
result = _executeSQL(query, print_time_sql=False, method="fetchall")
Expand Down Expand Up @@ -674,7 +674,7 @@ def aggregate(
_executeSQL(
query=f"""
SELECT
/*+LABEL('vDataframe.aggregate')*/
/*+LABEL('vDataFrame.aggregate')*/
{columns_str}
FROM {self}""",
title=(
Expand Down Expand Up @@ -702,7 +702,7 @@ def aggregate(
result = _executeSQL(
query=f"""
SELECT
/*+LABEL('vDataframe.aggregate')*/
/*+LABEL('vDataFrame.aggregate')*/
{agg_fun}
FROM {self}""",
title=(
Expand Down Expand Up @@ -1043,7 +1043,7 @@ def describe(
query_result = _executeSQL(
query=f"""
SELECT
/*+LABEL('vDataframe.describe')*/
/*+LABEL('vDataFrame.describe')*/
SUMMARIZE_NUMCOL({cols_to_compute_str}) OVER ()
FROM {self}""",
title=(
Expand Down Expand Up @@ -3418,7 +3418,7 @@ def duplicated(
total = _executeSQL(
query=f"""
SELECT
/*+LABEL('vDataframe.duplicated')*/ COUNT(*)
/*+LABEL('vDataFrame.duplicated')*/ COUNT(*)
FROM {main_table}""",
title="Computing the number of duplicates.",
method="fetchfirstelem",
Expand All @@ -3440,7 +3440,7 @@ def duplicated(
result.count = _executeSQL(
query=f"""
SELECT
/*+LABEL('vDataframe.duplicated')*/ COUNT(*)
/*+LABEL('vDataFrame.duplicated')*/ COUNT(*)
FROM
(SELECT
{columns},
Expand Down
Loading

0 comments on commit 487b84e

Please sign in to comment.