Convert NPY to TSV
Turn NPY files into TSV. The array as tab-separated values with a header row; cells holding a tab, quote or line break are quoted.
Converted in an isolated sandbox on our serversDeleted after 24 hours
Drop NPY files on the dialor turn it to pick what to do
A NumPy array as a table of text.One TSV file with a header row. The shape of the array decides the columns.
What you get
A single TSV file that starts with a header row. A 1-D array becomes one column. A 2-D array becomes a table with a column for each index of its second axis, named 0, 1, 2 and so on.
A record array gets a column for each field. A field that holds an array or nested records is written as JSON text.
Arrays with more dimensions
An array of three or more dimensions becomes one row for each index of all but its last axis. Those rows are led by the columns axis0, axis1 and so on, which tell you where each row sits in the array.
How values are written
Numbers keep their shortest exact form. Booleans become true and false, and dates and times become ISO 8601. NaN and NaT become empty cells, and infinities become inf and -inf.
Cells that hold a tab, a quote or a line break are quoted, so they stay in one cell.
Arrays that fail
Arrays of Python objects are not loaded, because unpickling them could run code. The conversion stops with
unsupported_elements.To work with the result next, see merge TSV or every TSV conversion.
NPY and TSV.What each format is.
The formats
NumPy Array
A single NumPy array saved with numpy.save, with its shape and data type.
- Extensions
- .npy
- MIME type
- application
/x -npy - Kind
- Text and data
Tab-Separated Values
Tab-separated values.
- Extensions
- .tsv .tab
- MIME type
- text
/tab -separated -values - Kind
- Text and data
In your code.The same NPY to TSV conversion through the API, for your app or your agent.
$ cv convert report.npy report.tsv$ cv convert report.npy report.tsvQuestions.What people ask about NPY to TSV.
It becomes a table with a header row. Each index of the second axis gets a column, named 0, 1, 2 and so on.
Each field becomes a column. A field that holds an array or nested records is written as JSON text.
NaN becomes an empty cell. Infinities are written as inf and -inf.
The array holds Python objects. These are not loaded, since unpickling them could run code, so the conversion stops.