Decimals in node table from Excel file

17 views
Skip to first unread message

German Rosano

unread,
Nov 23, 2021, 7:29:49 AM11/23/21
to cytoscape-helpdesk
Hi!

I`m trying to import a column from Excel consisting of numbers with decinal points. Cytoscape correctly interprets the column values as floating points (I want to make continuous mapping) but numbers are rounded to an integer. So, e.g., 0.789 becomes 1.0.

How do I keep the decimals? Thanks!

Scooter Morris

unread,
Dec 2, 2021, 11:23:45 AM12/2/21
to cytoscape-helpdesk
Greetings!

Well, I've never seen that before.  Are you importing directly as an Excel spreadsheet, or are you exporting from Excel to a tsv or csv file?  If you aren't exporting it, give that a try and then make sure the values are correct in the exported file, then use that file to import things into cytoscape.  If it's still rounding, I would submit a bug and include the excel spreadsheet and your session file.

-- scooter

Schubidu Lalala

unread,
May 12, 2022, 7:11:15 AM5/12/22
to cytoscape-helpdesk
Hello,

I have the same issue und also importing as csv doesn't help. Is there a solution by now.

Scooter Morris

unread,
May 12, 2022, 10:49:14 AM5/12/22
to cytoscape-helpdesk
When you exported as a CSV file, what do the values look like?  If the values in the first several rows look like integers, Cytoscape will interpret the column as an integer column.  The fix is to force it to be a floating point column by right clicking on the column in the import interface and setting it to be a floating point column.  Also, make sure that the CSV is using "." as your decimal separator and not ",".

-- scooter
Reply all
Reply to author
Forward
0 new messages