Skip to content

Commit

Permalink
Merge pull request #421 from Renumics/feature/279-dataframe-with-non-…
Browse files Browse the repository at this point in the history
…string-column-names

Feature/279 dataframe with non string column names
  • Loading branch information
druzsan authored Feb 14, 2024
2 parents a0ca67b + a69548c commit a230e7b
Show file tree
Hide file tree
Showing 27 changed files with 245 additions and 148 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ repos:
- id: black
- id: black-jupyter
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
rev: v3.1.0
hooks:
- id: prettier
exclude: (\.secret\.)|(pnpm-lock.yaml)
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v9.0.0-alpha.2
rev: v8.56.0
hooks:
- id: eslint
files: src
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"@tippyjs/react": "^4.2.6",
"@types/dompurify": "^3.0.2",
"@uiw/react-json-view": "2.0.0-alpha.7",
"bleu-score": "^1.0.4",
"chroma-js": "^2.4.2",
"comlink": "^4.4.1",
"cropperjs": "^1.5.13",
Expand Down Expand Up @@ -91,8 +92,7 @@
"unique-names-generator": "^4.7.1",
"uuid": "^9.0.0",
"wavesurfer.js": "^6.4.0",
"zustand": "^4.3.3",
"bleu-score": "^1.0.4"
"zustand": "^4.3.3"
},
"devDependencies": {
"@openapitools/openapi-generator-cli": "^2.7.0",
Expand Down Expand Up @@ -132,7 +132,7 @@
"eslint-plugin-react-hooks": "^4.6.0",
"jest": "^29.4.3",
"node-fetch": "^2.6.9",
"prettier": "^2.7.1",
"prettier": "^3.2.5",
"tailwindcss": "^3.3.1",
"ts-jest": "^29.0.5",
"twin.macro": "^3.3.0",
Expand Down
86 changes: 57 additions & 29 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 0 additions & 11 deletions renumics/spotlight/backend/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,17 +138,6 @@ def __init__(self, dtype: DType, value: Any) -> None:
)


class DatasetColumnsNotUnique(Problem):
"""Dataset's columns are not unique"""

def __init__(self) -> None:
super().__init__(
"Dataset columns not unique",
"Dataset's columns are not unique.",
status.HTTP_403_FORBIDDEN,
)


class InvalidLayout(Problem):
"""The layout could not be parsed from the given source"""

Expand Down
2 changes: 1 addition & 1 deletion renumics/spotlight/dataset/pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def infer_dtype(column: pd.Series) -> dtypes.DType:

if pd.api.types.is_bool_dtype(column):
return dtypes.bool_dtype
if pd.api.types.is_categorical_dtype(column):
if isinstance(column.dtype, pd.CategoricalDtype):
return dtypes.CategoryDType(
{category: code for code, category in enumerate(column.cat.categories)}
)
Expand Down
Loading

0 comments on commit a230e7b

Please sign in to comment.