modin-project / modin-spreadsheet

An interactive grid for sorting, filtering, and editing DataFrames in Jupyter notebooks
Apache License 2.0
21 stars 5 forks source link

Issue new release #48

Open pyrito opened 2 years ago

pyrito commented 2 years ago

We have recently pushed some changes that have fixed modin-spreadsheet so that things aren't breaking. We should build a new release ASAP.

GeorgeAzaru commented 2 years ago

I am using the latest modin and modin spreadsheet and get the ModuleNotFoundError: No module named 'modin.spreadsheet' error.

Used code:

import modin.pandas as pd import modin.spreadsheet as mss df = pd.read_csv('https://raw.githubusercontent.com/fivethirtyeight/data/master/college-majors/all-ages.csv') spreadsheet = mss.from_dataframe(df) spreadsheet

pyrito commented 2 years ago

Hi @GeorgeAzaru could you please try: import modin.experimental.spreadsheet as mss?

GeorgeAzaru commented 2 years ago

Thanks for the reply. Now I get this:

KeyError Traceback (most recent call last) File c:\Users\gazaru.conda\envs\GreatExpectations\lib\site-packages\modin\config\pubsub.py:253, in Parameter.get(cls) 252 try: --> 253 raw = cls._get_raw_from_config() 254 except KeyError:

File c:\Users\gazaru.conda\envs\GreatExpectations\lib\site-packages\modin\config\envvars.py:46, in EnvironmentVariable._get_raw_from_config(cls) 33 """ 34 Read the value from environment variable. 35 (...) 44 If value is absent. 45 """ ---> 46 return os.environ[cls.varname]

File c:\Users\gazaru.conda\envs\GreatExpectations\lib\os.py:679, in _Environ.getitem(self, key) 677 except KeyError: 678 # raise KeyError with the original key value --> 679 raise KeyError(key) from None 680 return self.decodevalue(value)

KeyError: 'MODIN_ENGINE'

During handling of the above exception, another exception occurred: ... --> 374 self._handle = _dlopen(self._name, mode) 375 else: 376 self._handle = handle

FileNotFoundError: Could not find module 'c:\Users\gazaru.conda\envs\GreatExpectations\lib\site-packages\ray_raylet.pyd' (or one of its dependencies). Try using the full path with constructor syntax.

pyrito commented 2 years ago

@GeorgeAzaru do you have Ray installed?

GeorgeAzaru commented 2 years ago

Now the code is this:

import os

os.environ["MODIN_ENGINE"] = "ray" # Modin will use Ray

import modin.pandas as pd import modin.experimental.spreadsheet as mss

df = pd.read_csv('https://raw.githubusercontent.com/fivethirtyeight/data/master/college-majors/all-ages.csv') spreadsheet = mss.from_dataframe(df) spreadsheet

Error is this:

AttributeError Traceback (most recent call last) Untitled-1.ipynb Cell 2 in <cell line: 5>() 1 import modin.pandas as pd 2 import modin.experimental.spreadsheet as mss ----> 5 df = pd.read_csv('https://raw.githubusercontent.com/fivethirtyeight/data/master/college-majors/all-ages.csv') 6 spreadsheet = mss.from_dataframe(df) 7 spreadsheet

File c:\Users\gazaru.conda\envs\GreatExpectations\lib\site-packages\modin\logging\logger_function.py:65, in logger_decorator..decorator..run_and_log(*args, *kwargs) 50 """ 51 Compute function with logging if Modin logging is enabled. 52 (...) 62 Any 63 """ 64 if LogMode.get() == "disable": ---> 65 return f(args, **kwargs) 67 logger = get_logger() 68 try:

File c:\Users\gazaru.conda\envs\GreatExpectations\lib\site-packages\modin\pandas\io.py:140, in read_csv(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, squeeze, prefix, mangle_dupe_cols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, dayfirst, cache_dates, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, escapechar, comment, encoding, encoding_errors, dialect, error_bad_lines, warn_bad_lines, on_bad_lines, skipfooter, doublequote, delim_whitespace, low_memory, memory_map, float_precision, storageoptions) 138 , , , f_locals = inspect.getargvalues(inspect.currentframe()) 139 kwargs = {k: v for k, v in f_locals.items() if k in _pd_read_csv_signature} --> 140 return _read(**kwargs) ... 67 if (platform.system() == "Linux" 68 and "Microsoft".lower() in platform.release().lower()): 69 import ray._private.compat # noqa: E402

AttributeError: partially initialized module 'ray' has no attribute '_private' (most likely due to a circular import)

Also, I installed modin by using:

pip install "modin[all]"

pyrito commented 2 years ago

@GeorgeAzaru this repo may not be the best place to raise this issue. Could you please raise the issue here: https://github.com/modin-project/modin/issues

We can continue the discussion there with other Modin developers who can help figure out what's going on!