B
    Z                 @   sd   d Z dZdZe ZdZdZdZdZddlm	Z	 dd	l
mZ dd
lmZmZ dd Zdd Zdd ZdS )z"Bill Greene's credit scoring data.ZrestructuredtextzLUsed with express permission of the original author, who
retains all rights.z
William Greene's `Econometric Analysis`

More information can be found at the web site of the text:
http://pages.stern.nyu.edu/~wgreene/Text/econometricanalysis.htm
z$William Greene's credit scoring datazlMore information on this data can be found on the
homepage for Greene's `Econometric Analysis`. See source.
z::

    Number of observations - 72
    Number of variables - 5
    Variable name definitions - See Source for more information on the
                                variables.
    )
recfromtxt)utils)dirnameabspathc              C   s   t  } tj| dtdS )zLoad the credit card data and returns a Dataset class.

    Returns
    -------
    Dataset instance:
        See DATASET_PROPOSAL.txt for more information.
    r   )	endog_idxdtype)	_get_dataduZprocess_recarrayfloat)data r   >lib/python3.7/site-packages/statsmodels/datasets/ccard/data.pyload!   s    r   c              C   s   t  } tj| ddS )zLoad the credit card data and returns a Dataset class.

    Returns
    -------
    Dataset instance:
        See DATASET_PROPOSAL.txt for more information.
    r   )r   )r   r	   Zprocess_recarray_pandas)r   r   r   r   load_pandas,   s    r   c           	   C   s:   t tt} t| d d}t|ddtd}W d Q R X |S )Nz
/ccard.csvrb,T)Z	delimiternamesr   )r   r   __file__openr   r
   )filepathfr   r   r   r   r   7   s    r   N)__doc__Z__docformat__Z	COPYRIGHTZTITLEZSOURCEZ
DESCRSHORTZ	DESCRLONGZNOTEZnumpyr   Zstatsmodels.datasetsr   r	   os.pathr   r   r   r   r   r   r   r   r   <module>   s   