def _validate_pos ( df ) : assert isinstance ( df , pd . DataFrame ) assert [ "seqname" , "position" , "strand" ] == df . columns . tolist ( ) assert df . position . dtype == np . dtype ( "int64" ) assert df . strand . dtype == np . dtype ( "O" ) assert df . seqname . dtype == np . dtype ( "O" ) return df
how to check column format in python
Validates the returned positional object
def _validate_pos(df):
    """Validates the returned positional object
    """
    assert isinstance(df, pd.DataFrame)
    assert ["seqname", "position", "strand"] == df.columns.tolist()
    assert df.position.dtype == np.dtype("int64")
    assert df.strand.dtype == np.dtype("O")
    assert df.seqname.dtype == np.dtype("O")
    return df