def load_13f(url):
    """Load and parse an SEC.gov-hosted 13F XML file to Pandas DataFrame.

    Provide the URL to the raw .xml form13fInfoTable.  (See example below.)

    Parameters
    ----------
    url : str
        Link to .xml file.

    Returns
    -------
    df : pd.DataFrame
        Holdings snapshot.

    Example
    -------
    # Third Point LLC June 2017 13F
    >>> from pyfinance import datasets
    >>> url = 'https://www.sec.gov/Archives/edgar/data/1040273/000108514617001787/form13fInfoTable.xml'  # noqa
    >>> df = datasets.load_13f(url=url)

    .. _U.S. SEC: Accessing EDGAR Data:
       https://www.sec.gov/edgar/searchedgar/accessing-edgar-data.htm
    """

    resp = requests.get(url).text
    data = xmltodict.parse(resp)["informationTable"]["infoTable"]
    df = pd.DataFrame(data).drop(
        ["shrsOrPrnAmt", "investmentDiscretion"], axis=1
    )
    df["votingAuthority"] = df["votingAuthority"].apply(lambda d: d["Sole"])
    df.loc[:, "value"] = pd.to_numeric(df["value"], errors="coerce")
    df.loc[:, "votingAuthority"] = pd.to_numeric(
        df["votingAuthority"], errors="coerce"
    )
    return df
Load and parse an SEC.gov-hosted 13F XML file to Pandas DataFrame.

    Provide the URL to the raw .xml form13fInfoTable.  (See example below.)

    Parameters
    ----------
    url : str
        Link to .xml file.

    Returns
    -------
    df : pd.DataFrame
        Holdings snapshot.

    Example
    -------
    # Third Point LLC June 2017 13F
    >>> from pyfinance import datasets
    >>> url = 'https://www.sec.gov/Archives/edgar/data/1040273/000108514617001787/form13fInfoTable.xml'  # noqa
    >>> df = datasets.load_13f(url=url)

    .. _U.S. SEC: Accessing EDGAR Data:
       https://www.sec.gov/edgar/searchedgar/accessing-edgar-data.htm