开发者

Saving both strings and floats to the same file using np.savetxt?

开发者 https://www.devze.com 2023-03-28 14:15 出处:网络
I am relatively new to Python and would appreciate some guidance on exporting data. I have parsed some HTML and have np.arrays of strings and floats I would like to save: X contains a few columns of

I am relatively new to Python and would appreciate some guidance on exporting data.

I have parsed some HTML and have np.arrays of strings and floats I would like to save: X contains a few columns of short strings and Y contains several columns of float/int arrays, both created using np.hstack. I want to sav开发者_JAVA技巧e [X,Y] to the same file to create a data frame I can then import into Stata. Can this be done? Do I need to convert these arrays to other types in order to achieve my goal?

Thanks a lot.

0

精彩评论

暂无评论...
验证码 换一张
取 消