import pandas as pd

def combine_datasets_single_csv(
    csv_file: str,
    target_column: str = None,
    exclude_features: list = None
):
    """
    Load and process a single CSV file into a DataFrame suitable for modeling.
    Mimics the original combine_datasets() structure, returning a single DataFrame.

    Parameters
    ----------
    csv_file : str
        Path to the CSV file to load.
    target_column : str, optional
        Column to use as target. If None, assumes last column is the target.
    exclude_features : list of str, optional
        List of features to exclude from the DataFrame.

    Returns
    -------
    combined_data : pd.DataFrame
        Processed DataFrame, target column removed if specified.
        The format is compatible with previous combine_datasets outputs.
    """
    # Load CSV
    combined_data = pd.read_csv(csv_file)

    # Determine target
    if target_column is None:
        target_column = combined_data.columns[-1]  # default last column

    if target_column not in combined_data.columns:
        raise ValueError(f"Target column '{target_column}' not found in CSV.")

    # Separate target column internally (optional)
    target_series = combined_data[target_column]

    # Drop the target from features
    combined_data = combined_data.drop(columns=[target_column])

    # Drop additional user-specified features
    if exclude_features:
        for col in exclude_features:
            if col in combined_data.columns:
                combined_data = combined_data.drop(columns=[col])
            else:
                print(f"Warning: '{col}' not found in CSV and cannot be excluded.")

    # Mimic original structure: return combined_data as a DataFrame
    return combined_data
