Numpy loadtxt Behavior change with Python 3
Question: I have some code that has been working fine in Python 2.7 using numpy's
loadtxt function to read in a csv file into a numpy array. The file can be
seen [here](http://www.andrewhowe.com/INDEX_20140101.csv). I use this command

    
    
     inp = numpy.loadtxt(filename, dtype=str, delimiter=',',skiprows=1
    

With this, I get this in python 2.7

    
    
    array([['BKNIF', '01-Jan-2014', '11418.9', '11432.55', '11361', '11385.6',
        '0'],
       ['BSESN', '01-Jan-2014', '21222.19', '21244.35', '21133.82',
        '21140.48', '0'],
       ['DXY', '01-Jan-2014', '80.21', '80.24', '80.16', '80.19', '0'],
       ['FBV', '01-Jan-2014', '0', '0', '0', '0', '0']], 
      dtype='|S11')
    

However, with python 3.3, I'm getting

    
    
    array([["b'BKNIF'", "b'01-Jan-2014'", "b'11418.9'", "b'11432.55'",
            "b'11361'", "b'11385.6'", "b'0'"],
           ["b'BSESN'", "b'01-Jan-2014'", "b'21222.19'", "b'21244.35'",
            "b'21133.82'", "b'21140.48'", "b'0'"],
           ["b'DXY'", "b'01-Jan-2014'", "b'80.21'", "b'80.24'", "b'80.16'",
            "b'80.19'", "b'0'"],
           ["b'FBV'", "b'01-Jan-2014'", "b'0'", "b'0'", "b'0'", "b'0'", "b'0'"]], 
          dtype='<U14')
    

Note how the import has inserted the double quote around every item, and the b
in front. It has also apparently decide to code it differently. Even if I use
`dtype='|S11'` instead of `dtype=str`, I get the same behavior.

Please don't comment on why am I using numpy loadtxt for this, or if you think
my use of loadtxt is inefficient. Right now, I need help with figuring out why
the behavior changed, and how to fix it. Thanks.


Answer: 
    In [20]: m=loadtxt(fname, dtype='S20', delimiter=',', skiprows=1)
    
    In [21]: m.astype(str)
    Out[21]: 
    array([['BKNIF', '01-Jan-2014', '11418.9', '11432.55', '11361', '11385.6',
            '0'],
           ['BSESN', '01-Jan-2014', '21222.19', '21244.35', '21133.82',
            '21140.48', '0'],
           ['DXY', '01-Jan-2014', '80.21', '80.24', '80.16', '80.19', '0'],
           ['FBV', '01-Jan-2014', '0', '0', '0', '0', '0'],
           ['NSEI', '01-Jan-2014', '6323.8', '6327.2', '6298.25', '6301.65',
            '0'],
           ['NVOT', '01-Jan-2014', '30783.764', '2313498.5', '30783.764',
            '2313498.5', '0'],
           ['RUI', '01-Jan-2014', '1027.14', '1030.97', '1027.14', '1030.364',
            '0'],
           ['RUT', '01-Jan-2014', '1160.64', '1165.64', '1160.64', '1163.637',
            '0'],
           ['SENSEX', '01-Jan-2014', '21222.19', '21244.35', '21133.82',
            '21140.48', '0']], 
          dtype='<U20')
    

but still the elements are `numpy.bytes_`:

    
    
    m[0][0]
    Out[22]: b'BKNIF'
    
    type(m[0][0])
    Out[23]: numpy.bytes_
    

i think it's just looks not pretty?

