def to_table(self, name: str, format: Optional[str]=None, mode: str='w', partition_cols: Optional[Union[(str, List[str])]]=None, index_col: Optional[Union[(str, List[str])]]=None, **options: Any) -> None:
    if (index_col is None):
        log_advice('If `index_col` is not specified for `to_table`, the existing index is lost when converting to table.')
    mode = validate_mode(mode)
    return self.spark.to_table(name, format, mode, partition_cols, index_col, **options)
def to_table(self, name: str, format: Optional[str]=None, mode: str='w', partition_cols: Optional[Union[(str, List[str])]]=None, index_col: Optional[Union[(str, List[str])]]=None, **options: Any) -> None:
    if (index_col is None):
        log_advice('If `index_col` is not specified for `to_table`, the existing index is lost when converting to table.')
    mode = validate_mode(mode)
    return self.spark.to_table(name, format, mode, partition_cols, index_col, **options)