| 1 | initial version |
You can deal with .csv files by importing the csv module.
Hexadecimals are represented by numbers starting with 0x:
sage: 0x100 256 sage: 0x123 291
To transform an hexadecimal string representation of a number a to a Sage integer (that can be very long), you can do:
sage: a = '123' sage: ZZ('0x'+a) 291
If you need more informations, you should provide a sample of your csv file and the result you would expect.
| 2 | No.2 Revision |
You can deal with .csv files by importing the csv module.
Hexadecimals are represented by numbers starting with 0x, see this page :
sage: 0x100
256
sage: 0x123
To transform an hexadecimal string representation s of a number to a Sage integer (that can be very long), you can do:a
sage: If you need more informations, you should provide a sample of your csv file and the result you would expect.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.