diff --git a/arkouda/__init__.py b/arkouda/__init__.py index 3e727be4e80..b4e30e90037 100644 --- a/arkouda/__init__.py +++ b/arkouda/__init__.py @@ -415,10 +415,10 @@ ) from arkouda.client_dtypes import BitVector, bit_vectorizer, BitVectorizer, Fields, IPv4, ip_address, is_ipv4, is_ipv6 -from arkouda.groupbyclass import GROUPBY_REDUCTION_TYPES, GroupBy, broadcast, groupable, unique -from arkouda.categorical import Categorical +from arkouda.pandas.groupbyclass import GROUPBY_REDUCTION_TYPES, GroupBy, broadcast, groupable, unique +from arkouda.pandas.categorical import Categorical -from arkouda.dataframe import ( +from arkouda.pandas.dataframe import ( DataFrame, DataFrameGroupBy, DiffAggregate, @@ -427,7 +427,7 @@ invert_permutation, merge, ) -from arkouda.index import Index, MultiIndex +from arkouda.pandas.index import Index, MultiIndex from arkouda.numpy.alignment import ( NonUniqueError, align, @@ -451,7 +451,7 @@ date_operators, string_operators, ) -from arkouda.io import ( +from arkouda.pandas.io import ( export, get_columns, get_datasets, diff --git a/arkouda/accessor/__init__.py b/arkouda/accessor/__init__.py deleted file mode 100644 index e8f984df744..00000000000 --- a/arkouda/accessor/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# flake8: noqa -import warnings - -warnings.warn( - "arkouda.accessor is deprecated and will be removed in a future release. " - "Please use arkouda.pandas.accessor instead.", - DeprecationWarning, - stacklevel=2, -) - -from arkouda.pandas.accessor import ( - CachedAccessor, - DatetimeAccessor, - Properties, - StringAccessor, - date_operators, - string_operators, -) diff --git a/arkouda/alignment/__init__.py b/arkouda/alignment/__init__.py deleted file mode 100644 index 1f7dba56c3f..00000000000 --- a/arkouda/alignment/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -# flake8: noqa -import warnings - -warnings.warn( - "arkouda.alignment is deprecated and will be removed in a future release. " - "Please use arkouda.numpy.alignment instead.", - DeprecationWarning, - stacklevel=2, -) - -from arkouda.numpy.alignment import ( - NonUniqueError, - align, - find, - in1d_intervals, - interval_lookup, - is_cosorted, - left_align, - lookup, - right_align, - search_intervals, - unsqueeze, - zero_up, -) diff --git a/arkouda/categorical/__init__.py b/arkouda/categorical/__init__.py deleted file mode 100644 index a98f2b73758..00000000000 --- a/arkouda/categorical/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# flake8: noqa - -import warnings - -warnings.warn( - "arkouda.categorical is deprecated and will be removed in a future release. " - "Please use arkouda.pandas.categorical instead.", - DeprecationWarning, - stacklevel=2, -) - -from arkouda.pandas.categorical import * diff --git a/arkouda/client/__init__.py b/arkouda/client/__init__.py deleted file mode 100644 index e7e44ff2756..00000000000 --- a/arkouda/client/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# flake8: noqa - -import warnings - -warnings.warn( - "arkouda.client is deprecated and will be removed in a future release. " - "Please use arkouda.core.client instead.", - DeprecationWarning, - stacklevel=2, -) - -from arkouda.core.client import connect, disconnect, shutdown, get_config, get_registration_config, get_max_array_rank, get_mem_used, get_mem_avail, get_mem_status, get_server_commands, print_server_commands, generate_history, ruok diff --git a/arkouda/comm_diagnostics.py b/arkouda/comm_diagnostics.py index 62c811e4d6d..363f7da4f7e 100644 --- a/arkouda/comm_diagnostics.py +++ b/arkouda/comm_diagnostics.py @@ -82,7 +82,7 @@ See Also -------- -arkouda.DataFrame, arkouda.core.client.generic_msg +arkouda.pandas.DataFrame, arkouda.core.client.generic_msg """ diff --git a/arkouda/dataframe/__init__.py b/arkouda/dataframe/__init__.py deleted file mode 100644 index 159a59828e4..00000000000 --- a/arkouda/dataframe/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# flake8: noqa - -import warnings - -warnings.warn( - "arkouda.dataframe is deprecated and will be removed in a future release. " - "Please use arkouda.pandas.dataframe instead.", - DeprecationWarning, - stacklevel=2, -) - -from arkouda.pandas.dataframe import * diff --git a/arkouda/dtypes/__init__.py b/arkouda/dtypes/__init__.py deleted file mode 100644 index 83c9abc72fe..00000000000 --- a/arkouda/dtypes/__init__.py +++ /dev/null @@ -1,94 +0,0 @@ -# flake8: noqa - -import warnings - -warnings.warn( - "arkouda.dtypes is deprecated and will be removed in a future release. " - "Please use arkouda.numpy.dtypes instead.", - DeprecationWarning, - stacklevel=2, -) - -from arkouda.numpy.dtypes import ( - ARKOUDA_SUPPORTED_DTYPES, - ARKOUDA_SUPPORTED_INTS, - NUMBER_FORMAT_STRINGS, - BoolDType, - ByteDType, - BytesDType, - CLongDoubleDType, - Complex64DType, - Complex128DType, - DateTime64DType, - DType, - DTypeObjects, - DTypes, - Float16DType, - Float32DType, - Float64DType, - Int8DType, - Int16DType, - Int32DType, - Int64DType, - IntDType, - LongDoubleDType, - LongDType, - LongLongDType, - NumericDTypes, - ObjectDType, - ScalarDTypes, - SeriesDTypes, - ShortDType, - StrDType, - TimeDelta64DType, - UByteDType, - UInt8DType, - UInt16DType, - UInt32DType, - UInt64DType, - UIntDType, - ULongDType, - ULongLongDType, - UShortDType, - VoidDType, - all_scalars, - bigint, - bitType, - bool_scalars, - can_cast, - complex64, - complex128, - dtype, - float16, - float32, - float64, - float_scalars, - get_byteorder, - get_server_byteorder, - int8, - int16, - int32, - int64, - int_scalars, - intTypes, - is_supported_bool, - is_supported_dtype, - is_supported_float, - is_supported_int, - is_supported_number, - numeric_and_bool_scalars, - numeric_scalars, - numpy_scalars, - resolve_scalar_dtype, - str_, - str_scalars, - uint8, - uint16, - uint32, - uint64, - isSupportedInt, - isSupportedNumber, - isSupportedBool, - isSupportedFloat, - isSupportedDType -) diff --git a/arkouda/groupbyclass/__init__.py b/arkouda/groupbyclass/__init__.py deleted file mode 100644 index 24866670b13..00000000000 --- a/arkouda/groupbyclass/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# flake8: noqa - -import warnings - -warnings.warn( - "arkouda.groupbyclass is deprecated and will be removed in a future release. " - "Please use arkouda.pandas.groupbyclass instead.", - DeprecationWarning, - stacklevel=2, -) - -from arkouda.pandas.groupbyclass import * diff --git a/arkouda/index/__init__.py b/arkouda/index/__init__.py deleted file mode 100644 index 3e98e13c79f..00000000000 --- a/arkouda/index/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# flake8: noqa - -import warnings - -warnings.warn( - "arkouda.index is deprecated and will be removed in a future release. " - "Please use arkouda.pandas.index instead.", - DeprecationWarning, - stacklevel=2, -) - -from arkouda.pandas.index import * diff --git a/arkouda/infoclass/__init__.py b/arkouda/infoclass/__init__.py deleted file mode 100644 index f7f5f9a1e0e..00000000000 --- a/arkouda/infoclass/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# flake8: noqa - -import warnings - -warnings.warn( - "arkouda.infoclass is deprecated and will be removed in a future release. " - "Please use arkouda.core.infoclass instead.", - DeprecationWarning, - stacklevel=2, -) - -from arkouda.core.infoclass import AllSymbols, RegisteredSymbols, information, list_registry, list_symbol_table, pretty_print_information diff --git a/arkouda/io/__init__.py b/arkouda/io/__init__.py deleted file mode 100644 index 5e37c54413e..00000000000 --- a/arkouda/io/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# flake8: noqa - -import warnings - -warnings.warn( - "arkouda.io is deprecated and will be removed in a future release. " - "Please use arkouda.pandas.io instead.", - DeprecationWarning, - stacklevel=2, -) - -from arkouda.pandas.io import * diff --git a/arkouda/io_util/__init__.py b/arkouda/io_util/__init__.py deleted file mode 100644 index 4f17627691a..00000000000 --- a/arkouda/io_util/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# flake8: noqa - -import warnings - -warnings.warn( - "arkouda.io_util is deprecated and will be removed in a future release. " - "Please use arkouda.pandas.io_util instead.", - DeprecationWarning, - stacklevel=2, -) - -from arkouda.pandas.io_util import * diff --git a/arkouda/join/__init__.py b/arkouda/join/__init__.py deleted file mode 100644 index 4008bec43d4..00000000000 --- a/arkouda/join/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# flake8: noqa - -import warnings - -warnings.warn( - "arkouda.join is deprecated and will be removed in a future release. " - "Please use arkouda.pandas.join instead.", - DeprecationWarning, - stacklevel=2, -) - -from arkouda.pandas.join import compute_join_size, gen_ranges, join_on_eq_with_dt diff --git a/arkouda/logger/__init__.py b/arkouda/logger/__init__.py deleted file mode 100644 index c81abfa379b..00000000000 --- a/arkouda/logger/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# flake8: noqa - -import warnings - -warnings.warn( - "arkouda.logger is deprecated and will be removed in a future release. " - "Please use arkouda.core.logger instead.", - DeprecationWarning, - stacklevel=2, -) - -from arkouda.core.logger import LogLevel,enable_verbose,disable_verbose,write_log,enableVerbose,disableVerbose diff --git a/arkouda/match/__init__.py b/arkouda/match/__init__.py deleted file mode 100644 index c0593ee5939..00000000000 --- a/arkouda/match/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -# flake8: noqa - -import warnings - -warnings.warn( - "arkouda.match is deprecated and will be removed in a future release. " - "Please use arkouda.pandas.match instead.", - DeprecationWarning, - stacklevel=2, -) -from arkouda.pandas.match import * diff --git a/arkouda/matcher/__init__.py b/arkouda/matcher/__init__.py deleted file mode 100644 index bc3d0af1674..00000000000 --- a/arkouda/matcher/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# flake8: noqa - -import warnings - -warnings.warn( - "arkouda.matcher is deprecated and will be removed in a future release. " - "Please use arkouda.pandas.matcher instead.", - DeprecationWarning, - stacklevel=2, -) - -from arkouda.pandas.matcher import * diff --git a/arkouda/message/__init__.py b/arkouda/message/__init__.py deleted file mode 100644 index cf9810fe124..00000000000 --- a/arkouda/message/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# flake8: noqa - -import warnings - -warnings.warn( - "arkouda.message is deprecated and will be removed in a future release. " - "Please use arkouda.core.message instead.", - DeprecationWarning, - stacklevel=2, -) - -from arkouda.core.message import MessageFormat, MessageType, ParameterObject, ReplyMessage, RequestMessage diff --git a/arkouda/numeric/__init__.py b/arkouda/numeric/__init__.py deleted file mode 100644 index 13e722e6366..00000000000 --- a/arkouda/numeric/__init__.py +++ /dev/null @@ -1,68 +0,0 @@ -# flake8: noqa - -import warnings - -warnings.warn( - "arkouda.numeric is deprecated and will be removed in a future release. " - "Please use arkouda.pandas.numeric instead.", - DeprecationWarning, - stacklevel=2, -) - -from arkouda.numpy.numeric import ( - ErrorMode, - abs, - arccos, - arccosh, - arcsin, - arcsinh, - arctan, - arctan2, - arctanh, - array_equal, - cast, - ceil, - clip, - cos, - cosh, - count_nonzero, - cumprod, - cumsum, - deg2rad, - exp, - expm1, - eye, - floor, - hash, - histogram, - histogram2d, - histogramdd, - isfinite, - isinf, - isnan, - log, - log1p, - log2, - log10, - matmul, - median, - nextafter, - percentile, - putmask, - quantile, - rad2deg, - round, - sign, - sin, - sinh, - square, - tan, - tanh, - transpose, - tril, - triu, - trunc, - value_counts, - vecdot, - where, -) diff --git a/arkouda/numpy/manipulation_functions.py b/arkouda/numpy/manipulation_functions.py index e60095e6b26..5e95fb5c4b6 100644 --- a/arkouda/numpy/manipulation_functions.py +++ b/arkouda/numpy/manipulation_functions.py @@ -183,9 +183,9 @@ def repeat( array([array([1 2]) array([3 4]) array([3 4])]) """ from arkouda.core.client import generic_msg + from arkouda.numpy.pdarrayclass import any as akany from arkouda.numpy.pdarraycreation import array as ak_array from arkouda.numpy.util import _integer_axis_validation - from arkouda.pdarrayclass import any as akany if isinstance(repeats, int): ak_repeats = ak_array([repeats], int) diff --git a/arkouda/numpy/numeric.py b/arkouda/numpy/numeric.py index 4da30ffcb9f..38f105db809 100644 --- a/arkouda/numpy/numeric.py +++ b/arkouda/numpy/numeric.py @@ -25,7 +25,6 @@ from typeguard import typechecked -from arkouda.groupbyclass import GroupBy, groupable from arkouda.numpy.dtypes import ( ARKOUDA_SUPPORTED_INTS, _datatype_check, @@ -59,6 +58,7 @@ from arkouda.numpy.pdarraycreation import array, linspace from arkouda.numpy.sorting import sort from arkouda.numpy.strings import Strings +from arkouda.pandas.groupbyclass import GroupBy, groupable from ._typing import ArkoudaNumericTypes, BuiltinNumericTypes, NumericDTypeTypes, StringDTypeTypes diff --git a/arkouda/numpy/pdarrayclass.py b/arkouda/numpy/pdarrayclass.py index 3ff3ea84c12..18b33fe34d1 100644 --- a/arkouda/numpy/pdarrayclass.py +++ b/arkouda/numpy/pdarrayclass.py @@ -12,8 +12,8 @@ from typeguard import typechecked +from arkouda.core.infoclass import information, pretty_print_information from arkouda.core.logger import get_arkouda_logger -from arkouda.infoclass import information, pretty_print_information from arkouda.numpy import err as akerr from arkouda.numpy.dtypes import ( NUMBER_FORMAT_STRINGS, @@ -567,7 +567,7 @@ class pdarray: The size in bytes of each element """ - from arkouda.dtypes import DType + from arkouda.numpy.dtypes import DType name: str dtype: np.dtype @@ -769,7 +769,7 @@ def copy(self) -> pdarray: pdarray A deep copy of the pdarray. """ - from arkouda.pdarraycreation import array + from arkouda.numpy.pdarraycreation import array ret = array(self, copy=True) if isinstance(ret, pdarray): @@ -4548,7 +4548,7 @@ def divmod( """ from arkouda.numpy import cast as akcast from arkouda.numpy import where as akwhere - from arkouda.pdarraycreation import full + from arkouda.numpy.pdarraycreation import full if not isinstance(x, pdarray) and not isinstance(y, pdarray): raise TypeError("At least one entry must be a pdarray.") @@ -4924,7 +4924,7 @@ def clz(pda: pdarray) -> pdarray: if pda.max_bits == -1: raise ValueError("max_bits must be set to count leading zeros") from arkouda.numpy import where - from arkouda.pdarraycreation import zeros + from arkouda.numpy.pdarraycreation import zeros uint_arrs = pda.bigint_to_uint_arrays() @@ -5010,7 +5010,7 @@ def ctz(pda: pdarray) -> pdarray: # which is only relevant when ctz(0) which is defined to be 0 from arkouda.numpy import where - from arkouda.pdarraycreation import zeros + from arkouda.numpy.pdarraycreation import zeros # reverse the list, so we visit low bits first diff --git a/arkouda/numpy/pdarraycreation.py b/arkouda/numpy/pdarraycreation.py index 9735d350940..0ca401fc6e1 100644 --- a/arkouda/numpy/pdarraycreation.py +++ b/arkouda/numpy/pdarraycreation.py @@ -1655,8 +1655,8 @@ def linspace( array([2.00000000000000000 3.00000000000000000])]) """ from arkouda import newaxis - from arkouda.numeric import transpose from arkouda.numpy.manipulation_functions import tile + from arkouda.numpy.numeric import transpose from arkouda.numpy.pdarrayclass import pdarray from arkouda.numpy.util import ( _integer_axis_validation, diff --git a/arkouda/numpy/segarray.py b/arkouda/numpy/segarray.py index 13a958ee3f3..9dd79541445 100644 --- a/arkouda/numpy/segarray.py +++ b/arkouda/numpy/segarray.py @@ -153,7 +153,7 @@ def from_multi_array(cls, m): @property def non_empty(self): - from arkouda.infoclass import list_symbol_table + from arkouda.core.infoclass import list_symbol_table if self._non_empty.name not in list_symbol_table(): self._non_empty = self.lengths > 0 diff --git a/arkouda/numpy/strings.py b/arkouda/numpy/strings.py index 71f991fec6d..6f00036aef9 100644 --- a/arkouda/numpy/strings.py +++ b/arkouda/numpy/strings.py @@ -23,8 +23,8 @@ import arkouda.numpy.dtypes +from arkouda.core.infoclass import information, list_symbol_table from arkouda.core.logger import ArkoudaLogger, get_arkouda_logger -from arkouda.infoclass import information, list_symbol_table from arkouda.numpy.dtypes import ( NUMBER_FORMAT_STRINGS, bool_scalars, @@ -432,7 +432,7 @@ def copy(self) -> Strings: Strings A deep copy of the Strings. """ - from arkouda.pdarraycreation import array + from arkouda.numpy.pdarraycreation import array ret = array(self, copy=True) if isinstance(ret, Strings): diff --git a/arkouda/numpy/util.py b/arkouda/numpy/util.py index 99cf4a1bafb..34b9fd3c43b 100644 --- a/arkouda/numpy/util.py +++ b/arkouda/numpy/util.py @@ -10,7 +10,7 @@ from typeguard import typechecked from arkouda.client_dtypes import BitVector, IPv4, bit_vectorizer -from arkouda.infoclass import list_registry +from arkouda.core.infoclass import list_registry from arkouda.numpy.dtypes import ( _is_dtype_in_union, dtype, @@ -58,11 +58,11 @@ if TYPE_CHECKING: - from arkouda.categorical import Categorical from arkouda.core.client import get_config, get_mem_used from arkouda.numpy.pdarraycreation import arange from arkouda.numpy.segarray import SegArray from arkouda.numpy.strings import Strings + from arkouda.pandas.categorical import Categorical from arkouda.pandas.index import Index from arkouda.pandas.series import Series else: @@ -223,7 +223,7 @@ def register(obj, name): Examples -------- >>> import arkouda as ak - >>> from arkouda.util import register + >>> from arkouda.numpy.util import register >>> obj = ak.array([1, 2, 3]) >>> registered_obj = register(obj, "my_array") >>> print(registered_obj) @@ -768,7 +768,7 @@ def broadcast_dims(sa: Sequence[int], sb: Sequence[int]) -> Tuple[int, ...]: Examples -------- >>> import arkouda as ak - >>> from arkouda.util import broadcast_dims + >>> from arkouda.numpy.util import broadcast_dims >>> broadcast_dims((5, 1), (1, 3)) (5, 3) @@ -826,7 +826,7 @@ def convert_bytes(nbytes: int_scalars, unit: Literal["B", "KB", "MB", "GB"] = "B Examples -------- >>> import arkouda as ak - >>> from arkouda.util import convert_bytes + >>> from arkouda.numpy.util import convert_bytes >>> convert_bytes(2048, unit="KB") 2.0 @@ -1262,7 +1262,7 @@ def _ak_buffer_names(x): # Strings: typically has .offsets and .values (or .offsets and .bytes) try: - from arkouda.strings import Strings + from arkouda.numpy.strings import Strings if isinstance(x, Strings): # Some versions expose .values, older expose .bytes @@ -1276,7 +1276,7 @@ def _ak_buffer_names(x): # SegArray: segments + values try: - from arkouda.segarray import SegArray + from arkouda.numpy.segarray import SegArray if isinstance(x, SegArray): if hasattr(x, "segments"): @@ -1289,7 +1289,7 @@ def _ak_buffer_names(x): # Categorical: codes + categories (Strings) try: - from arkouda.categorical import Categorical + from arkouda.pandas.categorical import Categorical if isinstance(x, Categorical): if hasattr(x, "codes"): diff --git a/arkouda/pandas/categorical.py b/arkouda/pandas/categorical.py index 6dde06279e1..31820d7b0e9 100644 --- a/arkouda/pandas/categorical.py +++ b/arkouda/pandas/categorical.py @@ -25,7 +25,7 @@ Typical Use ----------- >>> import arkouda as ak ->>> from arkouda.categorical import Categorical +>>> from arkouda.pandas.categorical import Categorical >>> strings = ak.array(["apple", "banana", "apple", "banana", "pear"]) >>> cat = Categorical(strings) >>> cat.codes @@ -40,7 +40,7 @@ See Also -------- - arkouda.Strings -- arkouda.groupbyclass.GroupBy +- arkouda.pandas.groupbyclass.GroupBy - pandas.Categorical """ @@ -72,8 +72,8 @@ from pandas import Index as pd_Index from typeguard import typechecked +from arkouda.core.infoclass import information from arkouda.core.logger import get_arkouda_logger -from arkouda.infoclass import information from arkouda.numpy.dtypes import bool_ as akbool from arkouda.numpy.dtypes import bool_scalars, int_scalars, resolve_scalar_dtype, str_, str_scalars from arkouda.numpy.dtypes import dtype as akdtype diff --git a/arkouda/pandas/dataframe.py b/arkouda/pandas/dataframe.py index 731757d8f46..a188eab9814 100644 --- a/arkouda/pandas/dataframe.py +++ b/arkouda/pandas/dataframe.py @@ -73,7 +73,6 @@ from arkouda.client_dtypes import BitVector, Fields, IPv4 from arkouda.core.client import maxTransferBytes -from arkouda.index import Index, MultiIndex from arkouda.numpy.dtypes import _is_dtype_in_union, bigint, numeric_scalars from arkouda.numpy.dtypes import bool_ as akbool from arkouda.numpy.dtypes import float64 as akfloat64 @@ -85,15 +84,16 @@ from arkouda.numpy.sorting import sort as aksort from arkouda.numpy.timeclass import Datetime, Timedelta from arkouda.pandas.groupbyclass import GROUPBY_REDUCTION_TYPES, GroupBy, unique +from arkouda.pandas.index import Index, MultiIndex from arkouda.pandas.join import inner_join from arkouda.pandas.row import Row if TYPE_CHECKING: - from arkouda.categorical import Categorical from arkouda.numpy.pdarraycreation import array from arkouda.numpy.segarray import SegArray from arkouda.numpy.strings import Strings + from arkouda.pandas.categorical import Categorical from arkouda.pandas.series import Series else: Categorical = TypeVar("Categorical") @@ -1753,7 +1753,7 @@ def columns(self): Returns ------- - arkouda.index.Index + arkouda.pandas.index.Index The values of the index are the column names of the dataframe. Examples @@ -1783,7 +1783,7 @@ def index(self): Returns ------- - arkouda.index.Index or arkouda.index.MultiIndex + arkouda.pandas.index.Index or arkouda.pandas.index.MultiIndex The index of the dataframe. Examples @@ -2464,7 +2464,7 @@ def _build_groupby( See Also -------- DataFrame.groupby - arkouda.groupbyclass.GroupBy + arkouda.pandas.groupbyclass.GroupBy Examples -------- @@ -2483,7 +2483,7 @@ def _build_groupby( Low-level GroupBy object: >>> df._build_groupby("col1") # doctest: +SKIP - + >>> df._build_groupby("col1").size() (array([1.00000000000000000 2.00000000000000000]), array([2 1])) @@ -2542,8 +2542,8 @@ def memory_usage(self, index=True, unit="B") -> Series: See Also -------- arkouda.numpy.pdarrayclass.nbytes - arkouda.index.Index.memory_usage - arkouda.index.MultiIndex.memory_usage + arkouda.pandas.index.Index.memory_usage + arkouda.pandas.index.MultiIndex.memory_usage arkouda.pandas.series.Series.memory_usage Examples @@ -3727,7 +3727,7 @@ def groupby(self, keys, use_series=True, as_index=True, dropna=True): 3 NaN 7 (4 rows x 2 columns) >>> df.groupby("col1") # doctest: +SKIP - + >>> df.groupby("col1").size() col1 1.0 2 @@ -5149,7 +5149,7 @@ def invert_permutation(perm): Examples -------- >>> import arkouda as ak - >>> from arkouda.index import Index + >>> from arkouda.pandas.index import Index >>> i = Index(ak.array([1,2,0,5,4])) >>> perm = i.argsort() >>> print(perm) diff --git a/arkouda/pandas/extension/_arkouda_array.py b/arkouda/pandas/extension/_arkouda_array.py index 3f829c5e8c8..a04248827a2 100644 --- a/arkouda/pandas/extension/_arkouda_array.py +++ b/arkouda/pandas/extension/_arkouda_array.py @@ -933,11 +933,11 @@ def isna(self) -> np.ndarray: If the underlying data buffer does not support missing-value detection or cannot produce a boolean mask. """ - from arkouda.categorical import Categorical from arkouda.numpy import isnan from arkouda.numpy.pdarrayclass import pdarray from arkouda.numpy.pdarraycreation import full from arkouda.numpy.segarray import SegArray + from arkouda.pandas.categorical import Categorical data = self._data diff --git a/arkouda/pandas/extension/_arkouda_categorical_array.py b/arkouda/pandas/extension/_arkouda_categorical_array.py index d95a1d24742..d652c12e6a9 100644 --- a/arkouda/pandas/extension/_arkouda_categorical_array.py +++ b/arkouda/pandas/extension/_arkouda_categorical_array.py @@ -22,7 +22,7 @@ if TYPE_CHECKING: - from arkouda.categorical import Categorical + from arkouda.pandas.categorical import Categorical else: Categorical = TypeVar("Categorical") @@ -353,7 +353,7 @@ def isna(self) -> np.ndarray: # detection is unsupported. # """ - from arkouda.categorical import Categorical + from arkouda.pandas.categorical import Categorical data = self._data # should be an arkouda.Categorical diff --git a/arkouda/pandas/extension/_dataframe_accessor.py b/arkouda/pandas/extension/_dataframe_accessor.py index bdb4cfe67b1..92789d464c1 100644 --- a/arkouda/pandas/extension/_dataframe_accessor.py +++ b/arkouda/pandas/extension/_dataframe_accessor.py @@ -434,7 +434,7 @@ def collect(self) -> pd_DataFrame: def to_ak_legacy(self) -> ak_DataFrame: """ - Convert this pandas DataFrame into the legacy :class:`arkouda.DataFrame`. + Convert this pandas DataFrame into the legacy :class:`arkouda.pandas.DataFrame`. This method performs a *materializing* conversion of a pandas DataFrame into the legacy Arkouda DataFrame structure. Every column is converted diff --git a/arkouda/pandas/extension/_index_accessor.py b/arkouda/pandas/extension/_index_accessor.py index d2d3d94932b..ca7d62493e8 100644 --- a/arkouda/pandas/extension/_index_accessor.py +++ b/arkouda/pandas/extension/_index_accessor.py @@ -61,10 +61,10 @@ from pandas.api.extensions import register_index_accessor -from arkouda.index import Index as ak_Index -from arkouda.index import MultiIndex as ak_MultiIndex from arkouda.numpy.pdarrayclass import pdarray from arkouda.pandas.extension import ArkoudaExtensionArray +from arkouda.pandas.index import Index as ak_Index +from arkouda.pandas.index import MultiIndex as ak_MultiIndex # --------------------------------------------------------------------------- @@ -76,8 +76,8 @@ def _pandas_index_to_ak(index: Union[pd.Index, pd.MultiIndex]) -> Union[ak_Index """ Convert a pandas Index or MultiIndex into a legacy Arkouda Index/MultiIndex. - This mirrors the behavior of :class:`arkouda.index.Index` and - :class:`arkouda.index.MultiIndex` constructors, which already know how to + This mirrors the behavior of :class:`arkouda.pandas.index.Index` and + :class:`arkouda.pandas.index.MultiIndex` constructors, which already know how to consume pandas Index / MultiIndex, including categorical levels. Parameters @@ -576,8 +576,8 @@ def lookup(self, key: object) -> pdarray: Perform a server-side lookup on the underlying Arkouda index. This is a thin convenience wrapper around the legacy - :meth:`arkouda.index.Index.lookup` / - :meth:`arkouda.index.MultiIndex.lookup` methods. It converts the + :meth:`arkouda.pandas.index.Index.lookup` / + :meth:`arkouda.pandas.index.MultiIndex.lookup` methods. It converts the pandas index to a legacy Arkouda index, performs the lookup on the server, and returns the resulting boolean mask. diff --git a/arkouda/pandas/groupbyclass.py b/arkouda/pandas/groupbyclass.py index 00baec9e992..0af450fdd91 100644 --- a/arkouda/pandas/groupbyclass.py +++ b/arkouda/pandas/groupbyclass.py @@ -31,7 +31,7 @@ Examples -------- >>> import arkouda as ak ->>> from arkouda.groupbyclass import GroupBy +>>> from arkouda.pandas.groupbyclass import GroupBy >>> keys = ak.array([0, 1, 0, 1, 0]) >>> values = ak.array([10, 20, 30, 40, 50]) @@ -1496,7 +1496,7 @@ def nunique(self, values: groupable) -> Tuple[groupable, pdarray]: # Count number of values per key keyorder, nuniq = g2.size() - from arkouda.categorical import Categorical + from arkouda.pandas.categorical import Categorical if not isinstance(keyorder, (pdarray, Strings, Categorical)): raise TypeError( diff --git a/arkouda/pandas/index.py b/arkouda/pandas/index.py index 445db36529c..ee47020db5d 100644 --- a/arkouda/pandas/index.py +++ b/arkouda/pandas/index.py @@ -36,7 +36,7 @@ Examples -------- >>> import arkouda as ak ->>> from arkouda.index import Index, MultiIndex +>>> from arkouda.pandas.index import Index, MultiIndex >>> idx = Index([10, 20, 30], name="id") >>> idx @@ -51,7 +51,7 @@ See Also -------- - arkouda.pandas.series.Series -- arkouda.categorical.Categorical +- arkouda.pandas.categorical.Categorical """ @@ -753,7 +753,7 @@ def memory_usage(self, unit="B"): See Also -------- arkouda.numpy.pdarrayclass.nbytes - arkouda.index.MultiIndex.memory_usage + arkouda.pandas.index.MultiIndex.memory_usage arkouda.pandas.series.Series.memory_usage arkouda.pandas.dataframe.DataFrame.memory_usage @@ -1200,7 +1200,7 @@ def map(self, arg: Union[dict, "Series"]) -> "Index": Returns ------- - arkouda.index.Index + arkouda.pandas.index.Index A new index with the values transformed by the mapping correspondence. Raises @@ -1616,7 +1616,7 @@ class MultiIndex(Index): Examples -------- >>> import arkouda as ak - >>> from arkouda.index import MultiIndex + >>> from arkouda.pandas.index import MultiIndex >>> a = ak.array([1, 2, 3]) >>> b = ak.array(['a', 'b', 'c']) >>> mi = MultiIndex([a, b]) @@ -1901,7 +1901,7 @@ def memory_usage(self, unit="B"): See Also -------- arkouda.numpy.pdarrayclass.nbytes - arkouda.index.Index.memory_usage + arkouda.pandas.index.Index.memory_usage arkouda.pandas.series.Series.memory_usage arkouda.pandas.dataframe.DataFrame.memory_usage @@ -1909,7 +1909,7 @@ def memory_usage(self, unit="B"): -------- >>> import arkouda as ak - >>> m = ak.index.MultiIndex([ak.array([1,2,3]),ak.array([4,5,6])]) + >>> m = ak.pandas.index.MultiIndex([ak.array([1,2,3]),ak.array([4,5,6])]) >>> m.memory_usage() 48 diff --git a/arkouda/pandas/io.py b/arkouda/pandas/io.py index 3df12bba30b..fda1d811448 100644 --- a/arkouda/pandas/io.py +++ b/arkouda/pandas/io.py @@ -1,7 +1,7 @@ """ Input/output utilities for Arkouda. -The `arkouda.io` module provides a comprehensive interface for reading from and writing to +The `arkouda.pandas.io` module provides a comprehensive interface for reading from and writing to various file formats including HDF5, Parquet, CSV, and Zarr. It supports importing/exporting data between Arkouda and Pandas, data checkpointing, and server snapshot/restore functionality. @@ -31,7 +31,7 @@ Examples -------- >>> import arkouda as ak ->>> from arkouda.io import to_parquet, read_parquet +>>> from arkouda.pandas.io import to_parquet, read_parquet >>> import os.path >>> from pathlib import Path >>> my_path = os.path.join(os.getcwd(), 'output') @@ -57,8 +57,8 @@ See Also -------- -arkouda.DataFrame, arkouda.pdarray, arkouda.strings.Strings, arkouda.segarray.SegArray, -arkouda.categorical.Categorical, arkouda.index.Index, arkouda.index.MultiIndex +arkouda.pandas.DataFrame, arkouda.pdarray, arkouda.strings.Strings, arkouda.numpy.segarray.SegArray, +arkouda.pandas.categorical.Categorical, arkouda.pandas.index.Index, arkouda.pandas.index.MultiIndex """ diff --git a/arkouda/pandas/io_util.py b/arkouda/pandas/io_util.py index 72a4d62b4cd..ca9e2bcd896 100644 --- a/arkouda/pandas/io_util.py +++ b/arkouda/pandas/io_util.py @@ -32,7 +32,7 @@ Examples -------- ->>> from arkouda.io_util import delete_directory, get_directory, write_line_to_file +>>> from arkouda.pandas.io_util import delete_directory, get_directory, write_line_to_file >>> path = get_directory("tmp/output") >>> write_line_to_file(path / "log.txt", "Computation completed") >>> delete_directory(path) diff --git a/arkouda/pandas/matcher.py b/arkouda/pandas/matcher.py index aed171e51a1..13148a5c6bf 100644 --- a/arkouda/pandas/matcher.py +++ b/arkouda/pandas/matcher.py @@ -33,9 +33,9 @@ See Also -------- - arkouda.join -- arkouda.groupbyclass +- arkouda.pandas.groupbyclass - arkouda.pandas.merge -- arkouda.categorical.Categorical +- arkouda.pandas.categorical.Categorical """ @@ -44,8 +44,8 @@ from typing import cast +from arkouda.core.infoclass import list_symbol_table from arkouda.core.logger import get_arkouda_logger -from arkouda.infoclass import list_symbol_table from arkouda.numpy.dtypes import str_scalars from arkouda.numpy.pdarrayclass import create_pdarray, pdarray from arkouda.pandas.match import Match, MatchType diff --git a/arkouda/pandas/row.py b/arkouda/pandas/row.py index 214f540ea3f..2f7cbd3811a 100644 --- a/arkouda/pandas/row.py +++ b/arkouda/pandas/row.py @@ -27,7 +27,7 @@ class Row(UserDict): Examples -------- >>> import arkouda as ak - >>> from arkouda.row import Row + >>> from arkouda.pandas.row import Row >>> df = ak.DataFrame({'x': ak.array([10, 20]), 'y': ak.array(['a', 'b'])}) Suppose df[0] returns {'x': 10, 'y': 'a'} @@ -52,7 +52,7 @@ def __str__(self) -> str: Examples -------- >>> import arkouda as ak - >>> from arkouda.row import Row + >>> from arkouda.pandas.row import Row >>> row = Row({'a': 1, 'b': 'foo'}) >>> print(str(row)) keys values @@ -87,7 +87,7 @@ def _repr_html_(self) -> str: Examples -------- >>> import arkouda as ak - >>> from arkouda.row import Row + >>> from arkouda.pandas.row import Row >>> row = Row({'a': 1, 'b': 'foo'}) >>> html = row._repr_html_() >>> print(html.startswith('>> import arkouda as ak - >>> from arkouda.series import Series + >>> from arkouda.pandas.series import Series >>> s = ak.Series(ak.arange(3)) >>> s.memory_usage() 48 @@ -1457,9 +1457,9 @@ def map(self, arg: Union[dict, Series]) -> Series: """ from arkouda import Series - from arkouda.categorical import Categorical from arkouda.numpy.strings import Strings from arkouda.numpy.util import map + from arkouda.pandas.categorical import Categorical if not isinstance(self.values, (pdarray, Strings, Categorical)): raise TypeError("Series values must be of type pdarray, Categorical, or Strings to use map") diff --git a/arkouda/pdarrayclass/__init__.py b/arkouda/pdarrayclass/__init__.py deleted file mode 100644 index c4c9ce22a4f..00000000000 --- a/arkouda/pdarrayclass/__init__.py +++ /dev/null @@ -1,48 +0,0 @@ -# flake8: noqa - -import warnings - -warnings.warn( - "arkouda.pdarrayclass is deprecated and will be removed in a future release. " - "Please use arkouda.numpy.pdarrayclass instead.", - DeprecationWarning, - stacklevel=2, -) - -from arkouda.numpy.pdarrayclass import ( - RegistrationError, - all, - allclose, - any, - argmax, - argmaxk, - argmin, - argmink, - clear, - clz, - corr, - cov, - ctz, - divmod, - dot, - fmod, - is_sorted, - logical_not, - max, - maxk, - mean, - min, - mink, - mod, - parity, - pdarray, - popcount, - power, - prod, - rotl, - rotr, - sqrt, - std, - sum, - var, -) diff --git a/arkouda/pdarraycreation/__init__.py b/arkouda/pdarraycreation/__init__.py deleted file mode 100644 index c6091899407..00000000000 --- a/arkouda/pdarraycreation/__init__.py +++ /dev/null @@ -1,30 +0,0 @@ -# flake8: noqa - -import warnings - -warnings.warn( - "arkouda.pdarraycreation is deprecated and will be removed in a future release. " - "Please use arkouda.numpy.pdarraycreation instead.", - DeprecationWarning, - stacklevel=2, -) - -from arkouda.numpy.pdarraycreation import ( - arange, - array, - bigint_from_uint_arrays, - full, - full_like, - linspace, - ones, - ones_like, - promote_to_common_dtype, - randint, - random_strings_lognormal, - random_strings_uniform, - scalar_array, - standard_normal, - uniform, - zeros, - zeros_like, -) diff --git a/arkouda/pdarraymanipulation/__init__.py b/arkouda/pdarraymanipulation/__init__.py deleted file mode 100644 index 849048e8a59..00000000000 --- a/arkouda/pdarraymanipulation/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# flake8: noqa - -import warnings - -warnings.warn( - "arkouda.pdarraymanipulation is deprecated and will be removed in a future release. " - "Please use arkouda.numpy.pdarraymanipulation instead.", - DeprecationWarning, - stacklevel=2, -) - -from arkouda.numpy.pdarraymanipulation import delete, hstack, vstack diff --git a/arkouda/pdarraysetops/__init__.py b/arkouda/pdarraysetops/__init__.py deleted file mode 100644 index 03caf2084e5..00000000000 --- a/arkouda/pdarraysetops/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# flake8: noqa - -import warnings - -warnings.warn( - "arkouda.pdarraysetops is deprecated and will be removed in a future release. " - "Please use arkouda.numpy.pdarraysetops instead.", - DeprecationWarning, - stacklevel=2, -) - -from arkouda.numpy.pdarraysetops import ( - concatenate, - in1d, - indexof1d, - intersect1d, - setdiff1d, - setxor1d, - union1d, -) diff --git a/arkouda/plotting.py b/arkouda/plotting.py index 3ee3f7cb225..7e3e6312ca6 100644 --- a/arkouda/plotting.py +++ b/arkouda/plotting.py @@ -47,7 +47,7 @@ See Also -------- - matplotlib.pyplot -- arkouda.DataFrame +- arkouda.pandas.DataFrame - arkouda.histogram """ @@ -66,15 +66,14 @@ import arkouda as ak -from arkouda.categorical import Categorical -from arkouda.dataframe import DataFrame -from arkouda.groupbyclass import GroupBy from arkouda.numpy import histogram, isnan -from arkouda.numpy.pdarrayclass import skew +from arkouda.numpy.pdarrayclass import pdarray, skew from arkouda.numpy.pdarraycreation import arange from arkouda.numpy.strings import Strings from arkouda.numpy.timeclass import Datetime, Timedelta, date_range, timedelta_range -from arkouda.pdarrayclass import pdarray +from arkouda.pandas.categorical import Categorical +from arkouda.pandas.dataframe import DataFrame +from arkouda.pandas.groupbyclass import GroupBy __all__ = [ diff --git a/arkouda/random/__init__.py b/arkouda/random/__init__.py deleted file mode 100644 index 2814b36a877..00000000000 --- a/arkouda/random/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# flake8: noqa - -import warnings - -warnings.warn( - "arkouda.random is deprecated and will be removed in a future release. " - "Please use arkouda.numpy.random instead.", - DeprecationWarning, - stacklevel=2, -) - -from arkouda.numpy.random import Generator, randint, standard_normal, uniform diff --git a/arkouda/row/__init__.py b/arkouda/row/__init__.py deleted file mode 100644 index 49fb34770cf..00000000000 --- a/arkouda/row/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# flake8: noqa - -import warnings - -warnings.warn( - "arkouda.row is deprecated and will be removed in a future release. " - "Please use arkouda.pandas.row instead.", - DeprecationWarning, - stacklevel=2, -) - -from arkouda.pandas.row import Row diff --git a/arkouda/security/__init__.py b/arkouda/security/__init__.py deleted file mode 100644 index 9bb774e2adc..00000000000 --- a/arkouda/security/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# flake8: noqa - -import warnings - -warnings.warn( - "arkouda.security is deprecated and will be removed in a future release. " - "Please use arkouda.core.security instead.", - DeprecationWarning, - stacklevel=2, -) - -from arkouda.core.security import generate_token, generate_username_token_json, get_arkouda_client_directory, get_home_directory, get_username diff --git a/arkouda/segarray/__init__.py b/arkouda/segarray/__init__.py deleted file mode 100644 index 9d32a9b4e1e..00000000000 --- a/arkouda/segarray/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# flake8: noqa - -import warnings - -warnings.warn( - "arkouda.segarray is deprecated and will be removed in a future release. " - "Please use arkouda.numpy.segarray instead.", - DeprecationWarning, - stacklevel=2, -) - -from arkouda.numpy.segarray import SegArray diff --git a/arkouda/series/__init__.py b/arkouda/series/__init__.py deleted file mode 100644 index db25812e9d7..00000000000 --- a/arkouda/series/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# flake8: noqa - -import warnings - -warnings.warn( - "arkouda.series is deprecated and will be removed in a future release. " - "Please use arkouda.pandas.series instead.", - DeprecationWarning, - stacklevel=2, -) - -from arkouda.pandas.series import Series diff --git a/arkouda/sorting/__init__.py b/arkouda/sorting/__init__.py deleted file mode 100644 index e58b1c66127..00000000000 --- a/arkouda/sorting/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# flake8: noqa - -import warnings - -warnings.warn( - "arkouda.sorting is deprecated and will be removed in a future release. " - "Please use arkouda.numpy.sorting instead.", - DeprecationWarning, - stacklevel=2, -) - -from arkouda.numpy.sorting import SortingAlgorithm, argsort, coargsort, searchsorted, sort diff --git a/arkouda/sparrayclass/__init__.py b/arkouda/sparrayclass/__init__.py deleted file mode 100644 index 0cd7c83bd90..00000000000 --- a/arkouda/sparrayclass/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# flake8: noqa - -import warnings - -warnings.warn( - "arkouda.sparrayclass is deprecated and will be removed in a future release. " - "Please use arkouda.scipy.sparrayclass instead.", - DeprecationWarning, - stacklevel=2, -) - -from arkouda.scipy.sparrayclass import create_sparray, sparray diff --git a/arkouda/sparsematrix/__init__.py b/arkouda/sparsematrix/__init__.py deleted file mode 100644 index 2099a0d6700..00000000000 --- a/arkouda/sparsematrix/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# flake8: noqa - -import warnings - -warnings.warn( - "arkouda.sparsematrix is deprecated and will be removed in a future release. " - "Please use arkouda.scipy.sparsematrix instead.", - DeprecationWarning, - stacklevel=2, -) - -from arkouda.scipy.sparsematrix import ( - create_sparse_matrix, - random_sparse_matrix, - sparse_matrix_matrix_mult, -) diff --git a/arkouda/strings/__init__.py b/arkouda/strings/__init__.py deleted file mode 100644 index 4774c87d2d5..00000000000 --- a/arkouda/strings/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# flake8: noqa - -import warnings - -warnings.warn( - "arkouda.strings is deprecated and will be removed in a future release. " - "Please use arkouda.numpy.strings instead.", - DeprecationWarning, - stacklevel=2, -) - -from arkouda.numpy.strings import Strings diff --git a/arkouda/timeclass/__init__.py b/arkouda/timeclass/__init__.py deleted file mode 100644 index 97e324123e2..00000000000 --- a/arkouda/timeclass/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# flake8: noqa - -import warnings - -warnings.warn( - "arkouda.timeclass is deprecated and will be removed in a future release. " - "Please use arkouda.numpy.timeclass instead.", - DeprecationWarning, - stacklevel=2, -) - -from arkouda.numpy.timeclass import Datetime, Timedelta, date_range, timedelta_range diff --git a/arkouda/util/__init__.py b/arkouda/util/__init__.py deleted file mode 100644 index 22aad2785ce..00000000000 --- a/arkouda/util/__init__.py +++ /dev/null @@ -1,34 +0,0 @@ -# flake8: noqa - -import warnings - -warnings.warn( - "arkouda.util is deprecated and will be removed in a future release. " - "Please use arkouda.numpy.util instead.", - DeprecationWarning, - stacklevel=2, -) - -from arkouda.numpy.util import ( - attach, - attach_all, - broadcast_dims, - broadcast_to, - convert_bytes, - convert_if_categorical, - generic_concat, - get_callback, - identity, - invert_permutation, - is_float, - is_int, - is_numeric, - is_registered, - map, - register, - register_all, - report_mem, - sparse_sum_help, - unregister, - unregister_all, -) diff --git a/pydoc/file_io/CSV.md b/pydoc/file_io/CSV.md index bf655155277..4bef8740dec 100644 --- a/pydoc/file_io/CSV.md +++ b/pydoc/file_io/CSV.md @@ -79,6 +79,6 @@ Due to differences in execution of the CSV format, generic load/read functionali ### DataFrame ```{eval-rst} -- :py:meth:`arkouda.DataFrame.to_csv` +- :py:meth:`arkouda.pandas.DataFrame.to_csv` - :py:meth:`arkodua.DataFrame.read_csv` ``` diff --git a/pydoc/file_io/HDF5.md b/pydoc/file_io/HDF5.md index 3bcae91f9c1..8a7c80a75b1 100644 --- a/pydoc/file_io/HDF5.md +++ b/pydoc/file_io/HDF5.md @@ -245,9 +245,9 @@ Older version of Arkouda used different schemas for `pdarray` and `Strings` obje ### DataFrame ```{eval-rst} -- :py:meth:`arkouda.DataFrame.to_hdf` -- :py:meth:`arkouda.DataFrame.save` -- :py:meth:`arkouda.DataFrame.load` +- :py:meth:`arkouda.pandas.DataFrame.to_hdf` +- :py:meth:`arkouda.pandas.DataFrame.save` +- :py:meth:`arkouda.pandas.DataFrame.load` ``` ### Strings diff --git a/pydoc/file_io/PARQUET.md b/pydoc/file_io/PARQUET.md index 59099066b1f..40ff01a3c39 100644 --- a/pydoc/file_io/PARQUET.md +++ b/pydoc/file_io/PARQUET.md @@ -56,9 +56,9 @@ Data can also be saved using no compression. Arkouda now supports writting Parqu ### DataFrame ```{eval-rst} -- :py:meth:`arkouda.DataFrame.to_parquet` -- :py:meth:`arkouda.DataFrame.save` -- :py:meth:`arkouda.DataFrame.load` +- :py:meth:`arkouda.pandas.DataFrame.to_parquet` +- :py:meth:`arkouda.pandas.DataFrame.save` +- :py:meth:`arkouda.pandas.DataFrame.load` ``` ### Strings diff --git a/pydoc/usage/dataframe.rst b/pydoc/usage/dataframe.rst index 2bc7ef9e2cd..749a46a59f8 100644 --- a/pydoc/usage/dataframe.rst +++ b/pydoc/usage/dataframe.rst @@ -4,7 +4,7 @@ DataFrames in Arkouda Like Pandas, Arkouda supports ``DataFrames``. The purpose and intended functionality remains the same in Arkouda, but are configured to be based on ``arkouda.pdarrays``. -.. autoclass:: arkouda.DataFrame +.. autoclass:: arkouda.pandas.DataFrame Data Types ========== @@ -28,7 +28,7 @@ Iteration Iterating directly over a ``DataFrame`` with ``for x in df`` is not recommended. Doing so is discouraged because it requires transferring all array data from the arkouda server to the Python client since there is almost always a more array-oriented way to express an iterator-based computation. To force this transfer, use the ``to_pandas`` function to return the ``DataFrame`` as a ``pandas.DataFrame``. This transfer will raise an error if it exceeds the byte limit defined in ``ak.client.maxTransferBytes``. -.. autofunction:: arkouda.DataFrame.to_pandas +.. autofunction:: arkouda.pandas.DataFrame.to_pandas Features ========== @@ -36,41 +36,41 @@ Features Drop --------- -.. autofunction:: arkouda.DataFrame.drop +.. autofunction:: arkouda.pandas.DataFrame.drop GroupBy ---------- -.. autofunction:: arkouda.DataFrame.groupby +.. autofunction:: arkouda.pandas.DataFrame.groupby Copy ---------- -.. autofunction:: arkouda.DataFrame.copy +.. autofunction:: arkouda.pandas.DataFrame.copy Filter ---------- -.. autofunction:: arkouda.DataFrame.filter_by_ranges +.. autofunction:: arkouda.pandas.DataFrame.filter_by_ranges Permutations ------------- -.. autofunction:: arkouda.DataFrame.apply_permutation +.. autofunction:: arkouda.pandas.DataFrame.apply_permutation Sorting ---------- -.. autofunction:: arkouda.DataFrame.argsort +.. autofunction:: arkouda.pandas.DataFrame.argsort -.. autofunction:: arkouda.DataFrame.coargsort +.. autofunction:: arkouda.pandas.DataFrame.coargsort -.. autofunction:: arkouda.DataFrame.sort_values +.. autofunction:: arkouda.pandas.DataFrame.sort_values Tail/Head of Data ------------------ -.. autofunction:: arkouda.DataFrame.tail +.. autofunction:: arkouda.pandas.DataFrame.tail -.. autofunction:: arkouda.DataFrame.head +.. autofunction:: arkouda.pandas.DataFrame.head Rename Columns --------------- -.. autofunction:: arkouda.DataFrame.rename +.. autofunction:: arkouda.pandas.DataFrame.rename Append ---------- @@ -78,12 +78,12 @@ Append Concatenate ------------ -.. autofunction:: arkouda.DataFrame.concat +.. autofunction:: arkouda.pandas.DataFrame.concat Reset Indexes -------------- -.. autofunction:: arkouda.DataFrame.reset_index +.. autofunction:: arkouda.pandas.DataFrame.reset_index Deduplication -------------- -.. autofunction:: arkouda.DataFrame.drop_duplicates +.. autofunction:: arkouda.pandas.DataFrame.drop_duplicates diff --git a/tests/numpy/manipulation_functions_test.py b/tests/numpy/manipulation_functions_test.py index 5c967f931f5..8b4307ee587 100644 --- a/tests/numpy/manipulation_functions_test.py +++ b/tests/numpy/manipulation_functions_test.py @@ -90,7 +90,7 @@ def test_repeat_pdarray(self, size, dtype): @pytest.mark.parametrize("dtype", [int, ak.int64, ak.uint64, float, ak.float64, ak.bigint]) @pytest.mark.parametrize("shape", [(2, 2, 2), (2, 2, 3), (2, 3, 2), (3, 2, 2)]) def test_repeat_dim_3(self, dtype, shape: Tuple[int, ...]): - from arkouda.pdarraycreation import randint as akrandint + from arkouda.numpy.pdarraycreation import randint as akrandint shape_prod = 1 for i in shape: @@ -120,7 +120,7 @@ def test_repeat_dim_3(self, dtype, shape: Tuple[int, ...]): @pytest.mark.parametrize("dtype", [int, ak.int64, ak.uint64, float, ak.float64, ak.bigint]) @pytest.mark.parametrize("shape", [(2, 3), (2, 2), (2, 1), (1, 2)]) def test_repeat_dim_2(self, dtype, shape: Tuple[int, ...]): - from arkouda.pdarraycreation import randint as akrandint + from arkouda.numpy.pdarraycreation import randint as akrandint shape_prod = 1 for i in shape: diff --git a/tests/numpy/pdarrayclass_test.py b/tests/numpy/pdarrayclass_test.py index f9423c4289c..9d9a4a0e952 100644 --- a/tests/numpy/pdarrayclass_test.py +++ b/tests/numpy/pdarrayclass_test.py @@ -6,7 +6,7 @@ import arkouda as ak from arkouda.core.client import get_array_ranks, get_max_array_rank -from arkouda.dtypes import bigint, uint8 +from arkouda.numpy.dtypes import bigint, uint8 from arkouda.testing import assert_almost_equivalent as ak_assert_almost_equivalent from arkouda.testing import assert_arkouda_array_equivalent, assert_equivalent from arkouda.testing import assert_equal as ak_assert_equal @@ -602,7 +602,7 @@ def test_argsort_multidim_ignored_axis(self): assert isinstance(result, ak.pdarray) def test_argsort_algorithm_enum(self): - from arkouda.sorting import SortingAlgorithm + from arkouda.numpy.sorting import SortingAlgorithm a = ak.array([4, 1, 3]) result = a.argsort(algorithm=SortingAlgorithm.RadixSortLSD) diff --git a/tests/numpy/util_test.py b/tests/numpy/util_test.py index f516dec3156..34a71625170 100644 --- a/tests/numpy/util_test.py +++ b/tests/numpy/util_test.py @@ -4,9 +4,8 @@ import arkouda as ak from arkouda.numpy import util -from arkouda.numpy.util import may_share_memory, shares_memory +from arkouda.numpy.util import is_float, is_int, is_numeric, map, may_share_memory, shares_memory from arkouda.testing import assert_arkouda_array_equivalent -from arkouda.util import is_float, is_int, is_numeric, map class TestUtil: @@ -262,7 +261,7 @@ def test_categorical_components_share_with_self(): def test_segarray_components_and_aliasing(): segs = ak.array([0, 2, 5]) vals = ak.array([10, 11, 20, 21, 22]) - from arkouda.segarray import SegArray + from arkouda.numpy.segarray import SegArray sa = SegArray(segs, vals) # SegArray reports sharing with its own components diff --git a/tests/pandas/accessor_test.py b/tests/pandas/accessor_test.py index b97985d195e..730e197abc4 100644 --- a/tests/pandas/accessor_test.py +++ b/tests/pandas/accessor_test.py @@ -5,16 +5,16 @@ import arkouda as ak from arkouda import Series -from arkouda.accessor import ( +from arkouda.numpy.pdarraycreation import array +from arkouda.numpy.timeclass import Datetime +from arkouda.pandas.accessor import ( CachedAccessor, DatetimeAccessor, StringAccessor, date_operators, string_operators, ) -from arkouda.categorical import Categorical -from arkouda.numpy.pdarraycreation import array -from arkouda.numpy.timeclass import Datetime +from arkouda.pandas.categorical import Categorical from arkouda.testing import assert_arkouda_pdarray_equal diff --git a/tests/pandas/dataframe_test.py b/tests/pandas/dataframe_test.py index ca968dabdd2..56bd12603d9 100644 --- a/tests/pandas/dataframe_test.py +++ b/tests/pandas/dataframe_test.py @@ -721,22 +721,22 @@ def test_gb_aggregations_return_dataframe(self): pd_result1 = pd_df.groupby(["key1", "key2"], as_index=False)[["count"]].sum() ak_result1 = ak_df.groupby(["key1", "key2"]).sum("count") assert_frame_equal(pd_result1, ak_result1.to_pandas(retain_index=True)) - assert isinstance(ak_result1, ak.dataframe.DataFrame) + assert isinstance(ak_result1, ak.pandas.dataframe.DataFrame) pd_result2 = pd_df.groupby(["key1", "key2"], as_index=False)[["count"]].sum() ak_result2 = ak_df.groupby(["key1", "key2"]).sum(["count"]) assert_frame_equal(pd_result2, ak_result2.to_pandas(retain_index=True)) - assert isinstance(ak_result2, ak.dataframe.DataFrame) + assert isinstance(ak_result2, ak.pandas.dataframe.DataFrame) pd_result3 = pd_df.groupby(["key1", "key2"], as_index=False)[["count", "nums"]].sum() ak_result3 = ak_df.groupby(["key1", "key2"]).sum(["count", "nums"]) assert_frame_equal(pd_result3, ak_result3.to_pandas(retain_index=True)) - assert isinstance(ak_result3, ak.dataframe.DataFrame) + assert isinstance(ak_result3, ak.pandas.dataframe.DataFrame) pd_result4 = pd_df.groupby(["key1", "key2"], as_index=False).sum(numeric_only=True) ak_result4 = ak_df.groupby(["key1", "key2"]).sum() assert_frame_equal(pd_result4, ak_result4.to_pandas(retain_index=True)) - assert isinstance(ak_result4, ak.dataframe.DataFrame) + assert isinstance(ak_result4, ak.pandas.dataframe.DataFrame) def test_gb_aggregations_numeric_types(self): ak_df = self.build_ak_df_example_numeric_types() @@ -779,7 +779,7 @@ def test_gb_size_multiple(self): pd_result1 = pd_df.groupby(["key1", "key2"], as_index=False).size() ak_result1 = ak_df.groupby(["key1", "key2"], as_index=False).size() assert_frame_equal(pd_result1, ak_result1.to_pandas(retain_index=True)) - assert isinstance(ak_result1, ak.dataframe.DataFrame) + assert isinstance(ak_result1, ak.pandas.dataframe.DataFrame) assert_frame_equal( ak_df.groupby(["key1", "key2"], as_index=False).size().to_pandas(retain_index=True), @@ -823,7 +823,7 @@ def test_gb_size_match_pandas(self): ak_result = ak_df.groupby(gb_keys, as_index=as_index, dropna=dropna).size() pd_result = pd_df.groupby(gb_keys, as_index=as_index, dropna=dropna).size() - if isinstance(ak_result, ak.dataframe.DataFrame): + if isinstance(ak_result, ak.pandas.dataframe.DataFrame): assert_frame_equal(ak_result.to_pandas(retain_index=True), pd_result) else: assert_series_equal(ak_result.to_pandas(), pd_result) @@ -942,7 +942,7 @@ def test_sort_index(self): for group_by in group_bys: ak_result = ak_df.groupby(group_by).size() pd_result = ak_result.to_pandas() - if isinstance(ak_result, ak.dataframe.DataFrame): + if isinstance(ak_result, ak.pandas.dataframe.DataFrame): assert_frame_equal( ak_result.sort_index().to_pandas(retain_index=True), pd_result.sort_index(), diff --git a/tests/pandas/extension/arkouda_extension.py b/tests/pandas/extension/arkouda_extension.py index dfb11c1b721..0603ed9b903 100644 --- a/tests/pandas/extension/arkouda_extension.py +++ b/tests/pandas/extension/arkouda_extension.py @@ -8,6 +8,7 @@ import arkouda as ak +from arkouda.numpy.pdarrayclass import pdarray from arkouda.numpy.strings import Strings from arkouda.pandas.categorical import Categorical from arkouda.pandas.extension import ( @@ -16,7 +17,6 @@ ArkoudaExtensionArray, ArkoudaStringArray, ) -from arkouda.pdarrayclass import pdarray from arkouda.testing import assert_arkouda_array_equal, assert_equal diff --git a/tests/pandas/extension/index_accessor.py b/tests/pandas/extension/index_accessor.py index e7d902d606c..65c7419f1cd 100644 --- a/tests/pandas/extension/index_accessor.py +++ b/tests/pandas/extension/index_accessor.py @@ -5,14 +5,14 @@ import arkouda as ak import arkouda.pandas.extension._index_accessor as idx_mod -from arkouda.index import Index as ak_Index -from arkouda.index import MultiIndex as ak_MultiIndex from arkouda.pandas.extension import ArkoudaExtensionArray from arkouda.pandas.extension._index_accessor import ( ArkoudaIndexAccessor, _ak_index_to_pandas_no_copy, _pandas_index_to_ak, ) +from arkouda.pandas.index import Index as ak_Index +from arkouda.pandas.index import MultiIndex as ak_MultiIndex def _assert_index_equal_values(p_idx: pd.Index, values): diff --git a/tests/pandas/groupby_test.py b/tests/pandas/groupby_test.py index 7a6c9af55bd..4a046515512 100644 --- a/tests/pandas/groupby_test.py +++ b/tests/pandas/groupby_test.py @@ -14,7 +14,7 @@ # block of variables and functions used in test_unique -UNIQUE_TYPES = [ak.categorical, ak.int64, ak.float64, ak.str_] +UNIQUE_TYPES = [ak.Categorical, ak.int64, ak.float64, ak.str_] VOWELS_AND_SUCH = ["a", "e", "i", "o", "u", "AB", 47, 2, 3.14159] PICKS = np.array([f"base {i}" for i in range(10)]) @@ -408,7 +408,7 @@ def test_broadcast_bigints(self): a = ak.arange(3, dtype=ak.bigint) a += 2**200 segs = ak.array([0, 2, 5]) - bi_broad = ak.groupbyclass.broadcast(segs, a, 8) + bi_broad = ak.pandas.groupbyclass.broadcast(segs, a, 8) indices = ak.broadcast(segs, ak.arange(3), 8) assert bi_broad.tolist() == a[indices].tolist() assert bi_broad.max_bits == a.max_bits @@ -851,7 +851,7 @@ def test_unique(self, data_type, prob_size): ak.str_: np.random.choice(VOWELS_AND_SUCH, prob_size), ak.int64: np.random.randint(0, prob_size // 3, prob_size), ak.float64: np.random.uniform(0, prob_size // 3, prob_size), - ak.categorical: np.random.choice(PICKS, prob_size), + ak.Categorical: np.random.choice(PICKS, prob_size), } nda = arrays[data_type] np_unique = np.unique(nda) # get unique keys from np for comparison diff --git a/tests/plotting_test.py b/tests/plotting_test.py index 24611f095d8..43f3ed1f3e1 100644 --- a/tests/plotting_test.py +++ b/tests/plotting_test.py @@ -37,7 +37,7 @@ def _connected_to_arkouda(): arkouda = pytest.importorskip("arkouda", reason="arkouda not installed") -pdarrayclass = pytest.importorskip("arkouda.pdarrayclass", reason="arkouda not installed") +pdarrayclass = pytest.importorskip("arkouda.numpy.pdarrayclass", reason="arkouda not installed") class TestPlotting: diff --git a/training/COMPARISON.md b/training/COMPARISON.md index 8ee57876928..fe8ba078ffb 100644 --- a/training/COMPARISON.md +++ b/training/COMPARISON.md @@ -307,7 +307,7 @@ If you find yourself in one of the situations demonstrated above, please contact Arkouda and `Pandas` support `DataFrame` objects. Throughout this section, you will notice that there are some key differences. Arkouda DataFrame support is fairly new and is continually being updated. The most common way to construct a `DataFrame` in both packages is by using a dictionary. However, other methods exist. Links to the documentation are below if you would like to review alternative methods. For the purposes of this document, we will be using Python Dictionaries. - [Pandas DataFrame Documentation](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html) -- [Arkouda DataFrame Documentation](https://bears-r-us.github.io/arkouda/usage/dataframe.html?highlight=dataframe#arkouda.DataFrame) +- [Arkouda DataFrame Documentation](https://bears-r-us.github.io/arkouda/usage/dataframe.html?highlight=dataframe#arkouda.pandas.DataFrame) ### Creating Pandas DataFrame