# Path: sksurv/column.py
# def _apply_along_column(array, func1d, **kwargs):
# def standardize_column(series_or_array, with_std=True):
# def standardize(table, with_std=True):
# def _encode_categorical_series(series, allow_drop=True):
# def encode_categorical(table, columns=None, **kwargs):
#     def _is_categorical_or_object(series):
# def _get_dummies_1d(data, allow_drop=True):
# def categorical_to_numeric(table):
#     def transform(column):


from collections import OrderedDict
from numpy.testing import assert_array_almost_equal, assert_array_equal
from sksurv import column
import numpy
import pandas
import pandas.testing as tm
import pytest
    data = pandas.DataFrame(numpy.arange(50, dtype=float).reshape(10, 5))

    expected = numpy.array([[-1.486301, -1.486301, -1.486301, -1.486301, -1.486301],
                            [-1.156012, -1.156012, -1.156012, -1.156012, -1.156012],
                            [-0.825723, -0.825723, -0.825723, -0.825723, -0.825723],
                            [-0.495434, -0.495434, -0.495434, -0.495434, -0.495434],
                            [-0.165145, -0.165145, -0.165145, -0.165145, -0.165145],
                            [0.165145, 0.165145, 0.165145, 0.165145, 0.165145],
                            [0.495434, 0.495434, 0.495434, 0.495434, 0.495434],
                            [0.825723, 0.825723, 0.825723, 0.825723, 0.825723],
                            [1.156012, 1.156012, 1.156012, 1.156012, 1.156012],
                            [1.486301, 1.486301, 1.486301, 1.486301, 1.486301]])
    return data, expected


@pytest.fixture()
def non_numeric_data_frame():
    data = pandas.DataFrame({'q1': ['no', 'no', 'yes', 'yes', 'no', 'no', None, 'yes', 'no', None],
                             'q2': ['maybe', 'no', 'yes', 'maybe', 'yes', 'no', None, 'maybe', 'no',
                                    'yes'],
                             'q3': [1, 2, 1, 3, 1, 2, numpy.nan, numpy.nan, 3, 2]})

    data['q3'] = data['q3'].astype('category')
    return data


class TestColumn:
    @staticmethod
    def test_standardize_numeric(numeric_data):
        numeric_data_frame, expected = numeric_data

# Path: sksurv/column.py
# def _apply_along_column(array, func1d, **kwargs):
# def standardize_column(series_or_array, with_std=True):
# def standardize(table, with_std=True):
# def _encode_categorical_series(series, allow_drop=True):
# def encode_categorical(table, columns=None, **kwargs):
#     def _is_categorical_or_object(series):
# def _get_dummies_1d(data, allow_drop=True):
# def categorical_to_numeric(table):
#     def transform(column):


# Path: tests/test_column.py
from collections import OrderedDict
from numpy.testing import assert_array_almost_equal, assert_array_equal
from sksurv import column
import numpy
import pandas
import pandas.testing as tm
import pytest

    data = pandas.DataFrame(numpy.arange(50, dtype=float).reshape(10, 5))

    expected = numpy.array([[-1.486301, -1.486301, -1.486301, -1.486301, -1.486301],
                            [-1.156012, -1.156012, -1.156012, -1.156012, -1.156012],
                            [-0.825723, -0.825723, -0.825723, -0.825723, -0.825723],
                            [-0.495434, -0.495434, -0.495434, -0.495434, -0.495434],
                            [-0.165145, -0.165145, -0.165145, -0.165145, -0.165145],
                            [0.165145, 0.165145, 0.165145, 0.165145, 0.165145],
                            [0.495434, 0.495434, 0.495434, 0.495434, 0.495434],
                            [0.825723, 0.825723, 0.825723, 0.825723, 0.825723],
                            [1.156012, 1.156012, 1.156012, 1.156012, 1.156012],
                            [1.486301, 1.486301, 1.486301, 1.486301, 1.486301]])
    return data, expected


@pytest.fixture()
def non_numeric_data_frame():
    data = pandas.DataFrame({'q1': ['no', 'no', 'yes', 'yes', 'no', 'no', None, 'yes', 'no', None],
                             'q2': ['maybe', 'no', 'yes', 'maybe', 'yes', 'no', None, 'maybe', 'no',
                                    'yes'],
                             'q3': [1, 2, 1, 3, 1, 2, numpy.nan, numpy.nan, 3, 2]})

    data['q3'] = data['q3'].astype('category')
    return data


class TestColumn:
    @staticmethod
    def test_standardize_numeric(numeric_data):
        numeric_data_frame, expected = numeric_data

        result = column.standardize(numeric_data_frame)