Esempio n. 1
0
def test_fields_infer(dataframe):
    expect = [
        {
            'type': ['null', 'boolean'],
            'name': 'Boolean'
        },
        {
            'type':
            ['null', {
                'logicalType': 'timestamp-micros',
                'type': 'long'
            }],
            'name': 'DateTime64'
        },
        {
            'type': ['null', 'double'],
            'name': 'Float64'
        },
        {
            'type': ['null', 'long'],
            'name': 'Int64'
        },
        {
            'type': ['null', 'string'],
            'name': 'String'
        },
    ]
    assert expect == pdx.__fields_infer(dataframe)
Esempio n. 2
0
def test_fields_infer(dataframe):
    expect = [{
        'type': ['null', 'boolean'],
        'name': 'Boolean'
    }, {
        'type': ['null', 'double'],
        'name': 'Float64'
    }, {
        'type': ['null', 'long'],
        'name': 'Int64'
    }, {
        'type': ['null', 'string'],
        'name': 'String'
    }]
    assert expect == pdx.__fields_infer(dataframe)