Skip to content

Commit

Permalink
fix dataframe index when downloading cleanlab columns (#213)
Browse files Browse the repository at this point in the history
* reset cl cols index

* bump version (1.3.3)
  • Loading branch information
axl1313 authored Apr 9, 2024
1 parent 188662c commit a4e1ae4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cleanlab_studio/internal/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def download_cleanlab_columns(
cleanset_json_io = io.StringIO(cleanset_json)
cleanset_pd: pd.DataFrame = pd.read_json(cleanset_json_io, orient="table")
cleanset_pd.rename(columns={"id": id_col}, inplace=True)
cleanset_pd.sort_values(by=id_col, inplace=True)
cleanset_pd.sort_values(by=id_col, inplace=True, ignore_index=True)
return cleanset_pd


Expand Down
5 changes: 0 additions & 5 deletions cleanlab_studio/studio/studio.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,6 @@ def download_cleanlab_columns(
include_project_details=include_project_details,
to_spark=to_spark,
)
if "cleanlab_row_ID" in rows_df.columns:
if to_spark:
rows_df.sort("cleanlab_row_ID")
else:
rows_df.sort_values(by="cleanlab_row_ID")
return rows_df

def apply_corrections(self, cleanset_id: str, dataset: Any, keep_excluded: bool = False) -> Any:
Expand Down
2 changes: 1 addition & 1 deletion cleanlab_studio/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "2.0.0"
__version__ = "2.0.1"

SCHEMA_VERSION = "0.2.0"
MIN_SCHEMA_VERSION = "0.1.0"
Expand Down

0 comments on commit a4e1ae4

Please sign in to comment.