def METHOD_NAME(
    sortby: str = "stars", page: int = 1, categories: str = ""
) -> pd.DataFrame:
    """Get repos sorted by stars or forks. Can be filtered by categories.
    Parameters
    ----------
    sortby : str
        Sort repos by {stars, forks}
    categories : str
        Check for repo categories. If more than one separate with a comma: e.g., finance,investment. Default: None
    page : int
        Page number to get repos
    Returns
    -------
    pd.DataFrame
        Dataframe with repos
    """
    params: Dict[str, Any] = {"page": page}
    if categories:
        params["sort"] = sortby
        params["q"] = categories.replace(",", "+")
    else:
        params["q"] = f"{sortby}:>1"
    data = get_github_data("https://api.github.com/search/repositories", params=params)
    if data and "items" in data:
        return pd.DataFrame(data["items"])
    return pd.DataFrame()