diff --git a/bigframes/dataframe.py b/bigframes/dataframe.py index b2947f7493..85760d94bc 100644 --- a/bigframes/dataframe.py +++ b/bigframes/dataframe.py @@ -582,6 +582,7 @@ def __getitem__( # Index of column labels can be treated the same as a sequence of column labels. pandas.Index, bigframes.series.Series, + slice, ], ): # No return type annotations (like pandas) as type cannot always be determined statically # NOTE: This implements the operations described in diff --git a/bigframes/ml/cluster.py b/bigframes/ml/cluster.py index cd27357680..9ce4649c5e 100644 --- a/bigframes/ml/cluster.py +++ b/bigframes/ml/cluster.py @@ -59,7 +59,7 @@ def __init__( warm_start: bool = False, ): self.n_clusters = n_clusters - # allow the alias to be compatible with sklean + # allow the alias to be compatible with sklearn self.init = "kmeans++" if init == "k-means++" else init self.init_col = init_col self.distance_type = distance_type diff --git a/bigframes/ml/forecasting.py b/bigframes/ml/forecasting.py index 2e93e5485f..d26abdfa71 100644 --- a/bigframes/ml/forecasting.py +++ b/bigframes/ml/forecasting.py @@ -211,7 +211,7 @@ def _fit( Args: X (bigframes.dataframe.DataFrame or bigframes.series.Series, or pandas.core.frame.DataFrame or pandas.core.series.Series): - A dataframe or series of trainging timestamp. + A dataframe or series of training timestamp. y (bigframes.dataframe.DataFrame, or bigframes.series.Series, or pandas.core.frame.DataFrame, or pandas.core.series.Series): Target values for training. diff --git a/bigframes/ml/llm.py b/bigframes/ml/llm.py index 11861c786e..eba15909b4 100644 --- a/bigframes/ml/llm.py +++ b/bigframes/ml/llm.py @@ -834,7 +834,7 @@ def to_gbq(self, model_name: str, replace: bool = False) -> GeminiTextGenerator: class Claude3TextGenerator(base.RetriableRemotePredictor): """Claude3 text generator LLM model. - Go to Google Cloud Console -> Vertex AI -> Model Garden page to enabe the models before use. Must have the Consumer Procurement Entitlement Manager Identity and Access Management (IAM) role to enable the models. + Go to Google Cloud Console -> Vertex AI -> Model Garden page to enable the models before use. Must have the Consumer Procurement Entitlement Manager Identity and Access Management (IAM) role to enable the models. https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/use-partner-models#grant-permissions .. note:: diff --git a/bigframes/ml/model_selection.py b/bigframes/ml/model_selection.py index ca089bb551..6eba4f81c2 100644 --- a/bigframes/ml/model_selection.py +++ b/bigframes/ml/model_selection.py @@ -82,7 +82,7 @@ def train_test_split( dfs = list(utils.batch_convert_to_dataframe(*arrays)) def _stratify_split(df: bpd.DataFrame, stratify: bpd.Series) -> List[bpd.DataFrame]: - """Split a single DF accoding to the stratify Series.""" + """Split a single DF according to the stratify Series.""" stratify = stratify.rename("bigframes_stratify_col") # avoid name conflicts merged_df = df.join(stratify.to_frame(), how="outer") diff --git a/bigframes/ml/preprocessing.py b/bigframes/ml/preprocessing.py index 0448d8544a..2e8dc64a53 100644 --- a/bigframes/ml/preprocessing.py +++ b/bigframes/ml/preprocessing.py @@ -434,7 +434,7 @@ def _compile_to_sql( if columns is None: columns = X.columns drop = self.drop if self.drop is not None else "none" - # minus one here since BQML's inplimentation always includes index 0, and top_k is on top of that. + # minus one here since BQML's implementation always includes index 0, and top_k is on top of that. top_k = ( (self.max_categories - 1) if self.max_categories is not None