pylegend 0.13.0__tar.gz → 0.14.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pylegend-0.13.0 → pylegend-0.14.0}/PKG-INFO +1 -1
- pylegend-0.14.0/pylegend/core/language/pandas_api/pandas_api_groupby_series.py +357 -0
- pylegend-0.14.0/pylegend/core/language/pandas_api/pandas_api_series.py +371 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/pandas_api/frames/functions/aggregate_function.py +21 -11
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/pandas_api/frames/pandas_api_applied_function_tds_frame.py +3 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/pandas_api/frames/pandas_api_base_tds_frame.py +10 -2
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/pandas_api/frames/pandas_api_groupby_tds_frame.py +87 -27
- {pylegend-0.13.0 → pylegend-0.14.0}/pyproject.toml +1 -1
- pylegend-0.13.0/pylegend/core/language/pandas_api/pandas_api_series.py +0 -177
- {pylegend-0.13.0 → pylegend-0.14.0}/LICENSE +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/LICENSE.spdx +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/NOTICE +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/README.md +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/_typing.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/database/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/database/sql_to_string/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/database/sql_to_string/config.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/database/sql_to_string/db_extension.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/database/sql_to_string/generator.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/legacy_api/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/legacy_api/aggregate_specification.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/legacy_api/legacy_api_tds_row.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/legendql_api/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/legendql_api/legendql_api_custom_expressions.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/legendql_api/legendql_api_tds_row.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/pandas_api/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/pandas_api/pandas_api_aggregate_specification.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/pandas_api/pandas_api_custom_expressions.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/pandas_api/pandas_api_tds_row.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/shared/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/shared/column_expressions.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/shared/expression.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/shared/functions.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/shared/helpers.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/shared/literal_expressions.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/shared/operations/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/shared/operations/binary_expression.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/shared/operations/boolean_operation_expressions.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/shared/operations/collection_operation_expressions.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/shared/operations/date_operation_expressions.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/shared/operations/float_operation_expressions.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/shared/operations/integer_operation_expressions.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/shared/operations/nary_expression.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/shared/operations/nullary_expression.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/shared/operations/number_operation_expressions.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/shared/operations/primitive_operation_expressions.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/shared/operations/string_operation_expressions.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/shared/operations/unary_expression.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/shared/pct_helpers.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/shared/primitive_collection.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/shared/primitives/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/shared/primitives/boolean.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/shared/primitives/date.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/shared/primitives/datetime.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/shared/primitives/float.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/shared/primitives/integer.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/shared/primitives/number.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/shared/primitives/primitive.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/shared/primitives/strictdate.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/shared/primitives/string.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/language/shared/tds_row.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/project_cooridnates.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/request/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/request/auth.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/request/legend_client.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/request/response_reader.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/request/service_client.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/sql/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/sql/metamodel.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/sql/metamodel_extension.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/abstract/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/abstract/frames/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/abstract/frames/applied_function_tds_frame.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/abstract/frames/base_tds_frame.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/abstract/frames/input_tds_frame.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/abstract/function_helpers.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legacy_api/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legacy_api/frames/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legacy_api/frames/functions/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legacy_api/frames/functions/legacy_api_concatenate_function.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legacy_api/frames/functions/legacy_api_distinct_function.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legacy_api/frames/functions/legacy_api_drop_function.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legacy_api/frames/functions/legacy_api_extend_function.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legacy_api/frames/functions/legacy_api_filter_function.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legacy_api/frames/functions/legacy_api_group_by_function.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legacy_api/frames/functions/legacy_api_head_function.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legacy_api/frames/functions/legacy_api_join_by_columns_function.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legacy_api/frames/functions/legacy_api_join_function.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legacy_api/frames/functions/legacy_api_rename_columns_function.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legacy_api/frames/functions/legacy_api_restrict_function.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legacy_api/frames/functions/legacy_api_slice_function.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legacy_api/frames/functions/legacy_api_sort_function.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legacy_api/frames/legacy_api_applied_function_tds_frame.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legacy_api/frames/legacy_api_base_tds_frame.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legacy_api/frames/legacy_api_input_tds_frame.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legacy_api/frames/legacy_api_tds_frame.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legendql_api/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legendql_api/frames/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legendql_api/frames/functions/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legendql_api/frames/functions/legendql_api_asofjoin_function.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legendql_api/frames/functions/legendql_api_concatenate_function.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legendql_api/frames/functions/legendql_api_distinct_function.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legendql_api/frames/functions/legendql_api_drop_function.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legendql_api/frames/functions/legendql_api_extend_function.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legendql_api/frames/functions/legendql_api_filter_function.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legendql_api/frames/functions/legendql_api_function_helpers.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legendql_api/frames/functions/legendql_api_groupby_function.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legendql_api/frames/functions/legendql_api_head_function.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legendql_api/frames/functions/legendql_api_join_function.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legendql_api/frames/functions/legendql_api_project_function.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legendql_api/frames/functions/legendql_api_rename_function.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legendql_api/frames/functions/legendql_api_select_function.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legendql_api/frames/functions/legendql_api_slice_function.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legendql_api/frames/functions/legendql_api_sort_function.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legendql_api/frames/functions/legendql_api_window_extend_function.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legendql_api/frames/legendql_api_applied_function_tds_frame.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legendql_api/frames/legendql_api_base_tds_frame.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legendql_api/frames/legendql_api_input_tds_frame.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/legendql_api/frames/legendql_api_tds_frame.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/pandas_api/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/pandas_api/frames/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/pandas_api/frames/functions/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/pandas_api/frames/functions/assign_function.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/pandas_api/frames/functions/drop.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/pandas_api/frames/functions/dropna.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/pandas_api/frames/functions/fillna.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/pandas_api/frames/functions/filter.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/pandas_api/frames/functions/filtering.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/pandas_api/frames/functions/iloc.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/pandas_api/frames/functions/loc.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/pandas_api/frames/functions/merge.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/pandas_api/frames/functions/rename.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/pandas_api/frames/functions/sort_values_function.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/pandas_api/frames/functions/truncate_function.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/pandas_api/frames/pandas_api_input_tds_frame.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/pandas_api/frames/pandas_api_tds_frame.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/result_handler/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/result_handler/result_handler.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/result_handler/to_csv_file_result_handler.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/result_handler/to_json_file_result_handler.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/result_handler/to_string_result_handler.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/sql_query_helpers.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/tds_column.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/core/tds/tds_frame.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/extensions/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/extensions/database/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/extensions/database/vendors/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/extensions/database/vendors/postgres/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/extensions/database/vendors/postgres/postgres_sql_to_string.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/extensions/tds/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/extensions/tds/abstract/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/extensions/tds/abstract/csv_tds_frame.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/extensions/tds/abstract/legend_function_input_frame.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/extensions/tds/abstract/legend_service_input_frame.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/extensions/tds/abstract/table_spec_input_frame.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/extensions/tds/legacy_api/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/extensions/tds/legacy_api/frames/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/extensions/tds/legacy_api/frames/legacy_api_legend_function_input_frame.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/extensions/tds/legacy_api/frames/legacy_api_legend_service_input_frame.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/extensions/tds/legacy_api/frames/legacy_api_table_spec_input_frame.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/extensions/tds/legendql_api/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/extensions/tds/legendql_api/frames/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/extensions/tds/legendql_api/frames/legendql_api_csv_input_frame.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/extensions/tds/legendql_api/frames/legendql_api_legend_function_input_frame.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/extensions/tds/legendql_api/frames/legendql_api_legend_service_input_frame.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/extensions/tds/legendql_api/frames/legendql_api_table_spec_input_frame.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/extensions/tds/pandas_api/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/extensions/tds/pandas_api/frames/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/extensions/tds/pandas_api/frames/pandas_api_legend_function_input_frame.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/extensions/tds/pandas_api/frames/pandas_api_legend_service_input_frame.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/extensions/tds/pandas_api/frames/pandas_api_table_spec_input_frame.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/extensions/tds/result_handler/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/extensions/tds/result_handler/to_pandas_df_result_handler.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/legacy_api_tds_client.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/legendql_api_tds_client.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/utils/__init__.py +0 -0
- {pylegend-0.13.0 → pylegend-0.14.0}/pylegend/utils/class_utils.py +0 -0
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
# Copyright 2026 Goldman Sachs
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
import copy
|
|
16
|
+
import pandas as pd
|
|
17
|
+
from pylegend._typing import (
|
|
18
|
+
TYPE_CHECKING,
|
|
19
|
+
PyLegendDict,
|
|
20
|
+
PyLegendOptional,
|
|
21
|
+
PyLegendSequence,
|
|
22
|
+
PyLegendTypeVar,
|
|
23
|
+
PyLegendUnion
|
|
24
|
+
)
|
|
25
|
+
from pylegend.core.language.pandas_api.pandas_api_aggregate_specification import PyLegendAggInput
|
|
26
|
+
from pylegend.core.language.pandas_api.pandas_api_series import (
|
|
27
|
+
SupportsToPureExpression,
|
|
28
|
+
SupportsToSqlExpression
|
|
29
|
+
)
|
|
30
|
+
from pylegend.core.language.pandas_api.pandas_api_tds_row import PandasApiTdsRow
|
|
31
|
+
from pylegend.core.language.shared.column_expressions import PyLegendColumnExpression
|
|
32
|
+
from pylegend.core.language.shared.expression import (
|
|
33
|
+
PyLegendExpressionBooleanReturn,
|
|
34
|
+
PyLegendExpressionDateReturn,
|
|
35
|
+
PyLegendExpressionDateTimeReturn,
|
|
36
|
+
PyLegendExpressionFloatReturn,
|
|
37
|
+
PyLegendExpressionIntegerReturn,
|
|
38
|
+
PyLegendExpressionNumberReturn,
|
|
39
|
+
PyLegendExpressionStrictDateReturn,
|
|
40
|
+
PyLegendExpressionStringReturn
|
|
41
|
+
)
|
|
42
|
+
from pylegend.core.language.shared.primitives.boolean import PyLegendBoolean
|
|
43
|
+
from pylegend.core.language.shared.primitives.date import PyLegendDate
|
|
44
|
+
from pylegend.core.language.shared.primitives.datetime import PyLegendDateTime
|
|
45
|
+
from pylegend.core.language.shared.primitives.float import PyLegendFloat
|
|
46
|
+
from pylegend.core.language.shared.primitives.integer import PyLegendInteger
|
|
47
|
+
from pylegend.core.language.shared.primitives.number import PyLegendNumber
|
|
48
|
+
from pylegend.core.language.shared.primitives.primitive import (
|
|
49
|
+
PyLegendPrimitive,
|
|
50
|
+
PyLegendPrimitiveOrPythonPrimitive
|
|
51
|
+
)
|
|
52
|
+
from pylegend.core.language.shared.primitives.strictdate import PyLegendStrictDate
|
|
53
|
+
from pylegend.core.language.shared.primitives.string import PyLegendString
|
|
54
|
+
from pylegend.core.sql.metamodel import Expression, QuerySpecification
|
|
55
|
+
from pylegend.core.tds.abstract.frames.base_tds_frame import BaseTdsFrame
|
|
56
|
+
from pylegend.core.tds.pandas_api.frames.pandas_api_applied_function_tds_frame import PandasApiAppliedFunctionTdsFrame
|
|
57
|
+
from pylegend.core.tds.pandas_api.frames.pandas_api_groupby_tds_frame import PandasApiGroupbyTdsFrame
|
|
58
|
+
from pylegend.core.tds.result_handler import ResultHandler
|
|
59
|
+
from pylegend.core.tds.tds_column import TdsColumn
|
|
60
|
+
from pylegend.core.tds.tds_frame import FrameToPureConfig, FrameToSqlConfig
|
|
61
|
+
from pylegend.extensions.tds.result_handler import PandasDfReadConfig
|
|
62
|
+
|
|
63
|
+
if TYPE_CHECKING:
|
|
64
|
+
from pylegend.core.tds.pandas_api.frames.pandas_api_tds_frame import PandasApiTdsFrame
|
|
65
|
+
|
|
66
|
+
__all__: PyLegendSequence[str] = [
|
|
67
|
+
"GroupbySeries",
|
|
68
|
+
"BooleanGroupbySeries",
|
|
69
|
+
"StringGroupbySeries",
|
|
70
|
+
"NumberGroupbySeries",
|
|
71
|
+
"IntegerGroupbySeries",
|
|
72
|
+
"FloatGroupbySeries",
|
|
73
|
+
"DateGroupbySeries",
|
|
74
|
+
"DateTimeGroupbySeries",
|
|
75
|
+
"StrictDateGroupbySeries",
|
|
76
|
+
]
|
|
77
|
+
|
|
78
|
+
R = PyLegendTypeVar('R')
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
class GroupbySeries(PyLegendColumnExpression, PyLegendPrimitive, BaseTdsFrame):
|
|
82
|
+
_base_groupby_frame: PandasApiGroupbyTdsFrame
|
|
83
|
+
_applied_function_frame: PyLegendOptional[PandasApiAppliedFunctionTdsFrame]
|
|
84
|
+
|
|
85
|
+
def __init__(self, base_groupby_frame: PandasApiGroupbyTdsFrame):
|
|
86
|
+
selected_columns = base_groupby_frame.get_selected_columns()
|
|
87
|
+
assert selected_columns is not None and len(selected_columns) == 1, (
|
|
88
|
+
"To initialize a GroupbySeries object, exactly one column must be selected, "
|
|
89
|
+
f"but got selected columns: {[str(col) for col in selected_columns] if selected_columns is not None else None}"
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
row = PandasApiTdsRow.from_tds_frame("c", base_groupby_frame.base_frame())
|
|
93
|
+
PyLegendColumnExpression.__init__(self, row=row, column=selected_columns[0].get_name())
|
|
94
|
+
|
|
95
|
+
self._base_groupby_frame: PandasApiGroupbyTdsFrame = base_groupby_frame
|
|
96
|
+
self._applied_function_frame = None
|
|
97
|
+
|
|
98
|
+
@property
|
|
99
|
+
def applied_function_frame(self) -> PyLegendOptional[PandasApiAppliedFunctionTdsFrame]:
|
|
100
|
+
return self._applied_function_frame
|
|
101
|
+
|
|
102
|
+
@applied_function_frame.setter
|
|
103
|
+
def applied_function_frame(self, value: PandasApiAppliedFunctionTdsFrame) -> None:
|
|
104
|
+
self._applied_function_frame = value
|
|
105
|
+
|
|
106
|
+
def _raise_exception_if_no_function_applied(self) -> PandasApiAppliedFunctionTdsFrame:
|
|
107
|
+
if self._applied_function_frame is None:
|
|
108
|
+
raise RuntimeError(
|
|
109
|
+
"The 'groupby' function requires at least one operation to be performed right after it (e.g. aggregate, rank)"
|
|
110
|
+
)
|
|
111
|
+
return self._applied_function_frame
|
|
112
|
+
|
|
113
|
+
def get_base_frame(self) -> "PandasApiGroupbyTdsFrame":
|
|
114
|
+
return self._base_groupby_frame
|
|
115
|
+
|
|
116
|
+
def to_sql_expression(
|
|
117
|
+
self,
|
|
118
|
+
frame_name_to_base_query_map: PyLegendDict[str, QuerySpecification],
|
|
119
|
+
config: FrameToSqlConfig
|
|
120
|
+
) -> Expression:
|
|
121
|
+
applied_function_frame = self._raise_exception_if_no_function_applied()
|
|
122
|
+
applied_func = applied_function_frame.get_applied_function()
|
|
123
|
+
if isinstance(applied_func, SupportsToSqlExpression):
|
|
124
|
+
return applied_func.to_sql_expression(frame_name_to_base_query_map, config)
|
|
125
|
+
|
|
126
|
+
raise NotImplementedError( # pragma: no cover
|
|
127
|
+
f"The '{applied_func.name()}' function cannot provide a SQL expression"
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
def to_pure_expression(self, config: FrameToPureConfig) -> str:
|
|
131
|
+
applied_function_frame = self._raise_exception_if_no_function_applied()
|
|
132
|
+
applied_func = applied_function_frame.get_applied_function()
|
|
133
|
+
if isinstance(applied_func, SupportsToPureExpression):
|
|
134
|
+
return applied_func.to_pure_expression(config)
|
|
135
|
+
|
|
136
|
+
raise NotImplementedError( # pragma: no cover
|
|
137
|
+
f"The '{applied_func.name()}' function cannot provide a pure expression"
|
|
138
|
+
)
|
|
139
|
+
|
|
140
|
+
def columns(self) -> PyLegendSequence[TdsColumn]:
|
|
141
|
+
applied_function_frame = self._raise_exception_if_no_function_applied()
|
|
142
|
+
return applied_function_frame.columns()
|
|
143
|
+
|
|
144
|
+
def to_sql_query(self, config: FrameToSqlConfig = FrameToSqlConfig()) -> str:
|
|
145
|
+
applied_function_frame = self._raise_exception_if_no_function_applied()
|
|
146
|
+
return applied_function_frame.to_sql_query(config)
|
|
147
|
+
|
|
148
|
+
def to_pure_query(self, config: FrameToPureConfig = FrameToPureConfig()) -> str:
|
|
149
|
+
applied_function_frame = self._raise_exception_if_no_function_applied()
|
|
150
|
+
return applied_function_frame.to_pure_query(config)
|
|
151
|
+
|
|
152
|
+
def execute_frame(
|
|
153
|
+
self,
|
|
154
|
+
result_handler: ResultHandler[R],
|
|
155
|
+
chunk_size: PyLegendOptional[int] = None
|
|
156
|
+
) -> R: # pragma: no cover
|
|
157
|
+
applied_function_frame = self._raise_exception_if_no_function_applied()
|
|
158
|
+
return applied_function_frame.execute_frame(result_handler, chunk_size)
|
|
159
|
+
|
|
160
|
+
def execute_frame_to_string(
|
|
161
|
+
self,
|
|
162
|
+
chunk_size: PyLegendOptional[int] = None
|
|
163
|
+
) -> str: # pragma: no cover
|
|
164
|
+
applied_function_frame = self._raise_exception_if_no_function_applied()
|
|
165
|
+
return applied_function_frame.execute_frame_to_string(chunk_size)
|
|
166
|
+
|
|
167
|
+
def execute_frame_to_pandas_df(
|
|
168
|
+
self,
|
|
169
|
+
chunk_size: PyLegendOptional[int] = None,
|
|
170
|
+
pandas_df_read_config: PandasDfReadConfig = PandasDfReadConfig()
|
|
171
|
+
) -> pd.DataFrame: # pragma: no cover
|
|
172
|
+
applied_function_frame = self._raise_exception_if_no_function_applied()
|
|
173
|
+
return applied_function_frame.execute_frame_to_pandas_df(chunk_size, pandas_df_read_config)
|
|
174
|
+
|
|
175
|
+
def to_sql_query_object(self, config: FrameToSqlConfig) -> QuerySpecification:
|
|
176
|
+
applied_function_frame = self._raise_exception_if_no_function_applied()
|
|
177
|
+
return applied_function_frame.to_sql_query_object(config)
|
|
178
|
+
|
|
179
|
+
def to_pure(self, config: FrameToPureConfig) -> str:
|
|
180
|
+
applied_function_frame = self._raise_exception_if_no_function_applied()
|
|
181
|
+
return applied_function_frame.to_pure(config)
|
|
182
|
+
|
|
183
|
+
def get_all_tds_frames(self) -> PyLegendSequence["BaseTdsFrame"]:
|
|
184
|
+
applied_function_frame = self._raise_exception_if_no_function_applied()
|
|
185
|
+
return applied_function_frame.get_all_tds_frames()
|
|
186
|
+
|
|
187
|
+
def aggregate(
|
|
188
|
+
self,
|
|
189
|
+
func: PyLegendAggInput,
|
|
190
|
+
axis: PyLegendUnion[int, str] = 0,
|
|
191
|
+
*args: PyLegendPrimitiveOrPythonPrimitive,
|
|
192
|
+
**kwargs: PyLegendPrimitiveOrPythonPrimitive
|
|
193
|
+
) -> "PandasApiTdsFrame":
|
|
194
|
+
new_series = copy.copy(self)
|
|
195
|
+
if new_series.applied_function_frame is None:
|
|
196
|
+
return new_series.get_base_frame().aggregate(func, axis, *args, **kwargs)
|
|
197
|
+
else:
|
|
198
|
+
return new_series.applied_function_frame.aggregate(func, axis, *args, **kwargs)
|
|
199
|
+
|
|
200
|
+
def agg(
|
|
201
|
+
self,
|
|
202
|
+
func: PyLegendAggInput,
|
|
203
|
+
axis: PyLegendUnion[int, str] = 0,
|
|
204
|
+
*args: PyLegendPrimitiveOrPythonPrimitive,
|
|
205
|
+
**kwargs: PyLegendPrimitiveOrPythonPrimitive
|
|
206
|
+
) -> "PandasApiTdsFrame":
|
|
207
|
+
return self.aggregate(func, axis, *args, **kwargs)
|
|
208
|
+
|
|
209
|
+
def sum(
|
|
210
|
+
self,
|
|
211
|
+
numeric_only: bool = False,
|
|
212
|
+
min_count: int = 0,
|
|
213
|
+
engine: PyLegendOptional[str] = None,
|
|
214
|
+
engine_kwargs: PyLegendOptional[PyLegendDict[str, bool]] = None,
|
|
215
|
+
) -> "PandasApiTdsFrame":
|
|
216
|
+
if numeric_only is not False:
|
|
217
|
+
raise NotImplementedError("numeric_only=True is not currently supported in sum function.")
|
|
218
|
+
if min_count != 0:
|
|
219
|
+
raise NotImplementedError(f"min_count must be 0 in sum function, but got: {min_count}")
|
|
220
|
+
if engine is not None:
|
|
221
|
+
raise NotImplementedError("engine parameter is not supported in sum function.")
|
|
222
|
+
if engine_kwargs is not None:
|
|
223
|
+
raise NotImplementedError("engine_kwargs parameter is not supported in sum function.")
|
|
224
|
+
return self.aggregate("sum", 0)
|
|
225
|
+
|
|
226
|
+
def mean(
|
|
227
|
+
self,
|
|
228
|
+
numeric_only: bool = False,
|
|
229
|
+
engine: PyLegendOptional[str] = None,
|
|
230
|
+
engine_kwargs: PyLegendOptional[PyLegendDict[str, bool]] = None,
|
|
231
|
+
) -> "PandasApiTdsFrame":
|
|
232
|
+
if numeric_only is not False:
|
|
233
|
+
raise NotImplementedError("numeric_only=True is not currently supported in mean function.")
|
|
234
|
+
if engine is not None:
|
|
235
|
+
raise NotImplementedError("engine parameter is not supported in mean function.")
|
|
236
|
+
if engine_kwargs is not None:
|
|
237
|
+
raise NotImplementedError("engine_kwargs parameter is not supported in mean function.")
|
|
238
|
+
return self.aggregate("mean", 0)
|
|
239
|
+
|
|
240
|
+
def min(
|
|
241
|
+
self,
|
|
242
|
+
numeric_only: bool = False,
|
|
243
|
+
min_count: int = -1,
|
|
244
|
+
engine: PyLegendOptional[str] = None,
|
|
245
|
+
engine_kwargs: PyLegendOptional[PyLegendDict[str, bool]] = None,
|
|
246
|
+
) -> "PandasApiTdsFrame":
|
|
247
|
+
if numeric_only is not False:
|
|
248
|
+
raise NotImplementedError("numeric_only=True is not currently supported in min function.")
|
|
249
|
+
if min_count != -1:
|
|
250
|
+
raise NotImplementedError(f"min_count must be -1 (default) in min function, but got: {min_count}")
|
|
251
|
+
if engine is not None:
|
|
252
|
+
raise NotImplementedError("engine parameter is not supported in min function.")
|
|
253
|
+
if engine_kwargs is not None:
|
|
254
|
+
raise NotImplementedError("engine_kwargs parameter is not supported in min function.")
|
|
255
|
+
return self.aggregate("min", 0)
|
|
256
|
+
|
|
257
|
+
def max(
|
|
258
|
+
self,
|
|
259
|
+
numeric_only: bool = False,
|
|
260
|
+
min_count: int = -1,
|
|
261
|
+
engine: PyLegendOptional[str] = None,
|
|
262
|
+
engine_kwargs: PyLegendOptional[PyLegendDict[str, bool]] = None,
|
|
263
|
+
) -> "PandasApiTdsFrame":
|
|
264
|
+
if numeric_only is not False:
|
|
265
|
+
raise NotImplementedError("numeric_only=True is not currently supported in max function.")
|
|
266
|
+
if min_count != -1:
|
|
267
|
+
raise NotImplementedError(f"min_count must be -1 (default) in max function, but got: {min_count}")
|
|
268
|
+
if engine is not None:
|
|
269
|
+
raise NotImplementedError("engine parameter is not supported in max function.")
|
|
270
|
+
if engine_kwargs is not None:
|
|
271
|
+
raise NotImplementedError("engine_kwargs parameter is not supported in max function.")
|
|
272
|
+
return self.aggregate("max", 0)
|
|
273
|
+
|
|
274
|
+
def std(
|
|
275
|
+
self,
|
|
276
|
+
ddof: int = 1,
|
|
277
|
+
engine: PyLegendOptional[str] = None,
|
|
278
|
+
engine_kwargs: PyLegendOptional[PyLegendDict[str, bool]] = None,
|
|
279
|
+
numeric_only: bool = False,
|
|
280
|
+
) -> "PandasApiTdsFrame":
|
|
281
|
+
if ddof != 1:
|
|
282
|
+
raise NotImplementedError(f"Only ddof=1 (Sample Standard Deviation) is supported in std function, but got: {ddof}")
|
|
283
|
+
if engine is not None:
|
|
284
|
+
raise NotImplementedError("engine parameter is not supported in std function.")
|
|
285
|
+
if engine_kwargs is not None:
|
|
286
|
+
raise NotImplementedError("engine_kwargs parameter is not supported in std function.")
|
|
287
|
+
if numeric_only is not False:
|
|
288
|
+
raise NotImplementedError("numeric_only=True is not currently supported in std function.")
|
|
289
|
+
return self.aggregate("std", 0)
|
|
290
|
+
|
|
291
|
+
def var(
|
|
292
|
+
self,
|
|
293
|
+
ddof: int = 1,
|
|
294
|
+
engine: PyLegendOptional[str] = None,
|
|
295
|
+
engine_kwargs: PyLegendOptional[PyLegendDict[str, bool]] = None,
|
|
296
|
+
numeric_only: bool = False,
|
|
297
|
+
) -> "PandasApiTdsFrame":
|
|
298
|
+
if ddof != 1:
|
|
299
|
+
raise NotImplementedError(f"Only ddof=1 (Sample Variance) is supported in var function, but got: {ddof}")
|
|
300
|
+
if engine is not None:
|
|
301
|
+
raise NotImplementedError("engine parameter is not supported in var function.")
|
|
302
|
+
if engine_kwargs is not None:
|
|
303
|
+
raise NotImplementedError("engine_kwargs parameter is not supported in var function.")
|
|
304
|
+
if numeric_only is not False:
|
|
305
|
+
raise NotImplementedError("numeric_only=True is not currently supported in var function.")
|
|
306
|
+
return self.aggregate("var", 0)
|
|
307
|
+
|
|
308
|
+
def count(self) -> "PandasApiTdsFrame":
|
|
309
|
+
return self.aggregate("count", 0)
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
class BooleanGroupbySeries(GroupbySeries, PyLegendBoolean, PyLegendExpressionBooleanReturn):
|
|
313
|
+
def __init__(self, base_frame: "PandasApiGroupbyTdsFrame"):
|
|
314
|
+
super().__init__(base_frame) # pragma: no cover (Boolean column not supported in PURE)
|
|
315
|
+
PyLegendBoolean.__init__(self, self) # pragma: no cover (Boolean column not supported in PURE)
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
class StringGroupbySeries(GroupbySeries, PyLegendString, PyLegendExpressionStringReturn):
|
|
319
|
+
def __init__(self, base_frame: "PandasApiGroupbyTdsFrame"):
|
|
320
|
+
super().__init__(base_frame)
|
|
321
|
+
PyLegendString.__init__(self, self)
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
class NumberGroupbySeries(GroupbySeries, PyLegendNumber, PyLegendExpressionNumberReturn):
|
|
325
|
+
def __init__(self, base_frame: "PandasApiGroupbyTdsFrame"):
|
|
326
|
+
super().__init__(base_frame)
|
|
327
|
+
PyLegendNumber.__init__(self, self)
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
class IntegerGroupbySeries(NumberGroupbySeries, PyLegendInteger, PyLegendExpressionIntegerReturn):
|
|
331
|
+
def __init__(self, base_frame: "PandasApiGroupbyTdsFrame"):
|
|
332
|
+
super().__init__(base_frame)
|
|
333
|
+
PyLegendInteger.__init__(self, self)
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
class FloatGroupbySeries(NumberGroupbySeries, PyLegendFloat, PyLegendExpressionFloatReturn):
|
|
337
|
+
def __init__(self, base_frame: "PandasApiGroupbyTdsFrame"):
|
|
338
|
+
super().__init__(base_frame)
|
|
339
|
+
PyLegendFloat.__init__(self, self)
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
class DateGroupbySeries(GroupbySeries, PyLegendDate, PyLegendExpressionDateReturn):
|
|
343
|
+
def __init__(self, base_frame: "PandasApiGroupbyTdsFrame"):
|
|
344
|
+
super().__init__(base_frame)
|
|
345
|
+
PyLegendDate.__init__(self, self)
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
class DateTimeGroupbySeries(DateGroupbySeries, PyLegendDateTime, PyLegendExpressionDateTimeReturn):
|
|
349
|
+
def __init__(self, base_frame: "PandasApiGroupbyTdsFrame"):
|
|
350
|
+
super().__init__(base_frame)
|
|
351
|
+
PyLegendDateTime.__init__(self, self)
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
class StrictDateGroupbySeries(DateGroupbySeries, PyLegendStrictDate, PyLegendExpressionStrictDateReturn):
|
|
355
|
+
def __init__(self, base_frame: "PandasApiGroupbyTdsFrame"):
|
|
356
|
+
super().__init__(base_frame)
|
|
357
|
+
PyLegendStrictDate.__init__(self, self)
|