I have a large list with thousands of numbers, the list is badly formatted if it is produced by Shegmat, But I should have it in the formatting shown below to "feed" any other function below. Here is a sample of well-formatted list:
c = [(7.850629, 25.421135, 22.162571), (37.706629, 28.421472, 0.229876), (37.560629, 21.421809, 18.320977), (39.238629, 26.422147, 18.442572), (35.087169, 0.419785, 15.055789),] You can see, all elements are aligned to correct based on exact and decimal place . So my question is: I can change the formatted incorrectly formatted (example shown below) to better formatted the above B = [(37.074, 945, 22.4, 14, 147, 9.77, 56, 324), (37.074945, 22.414665, 1.669214), (37.074945, 22.415002, 8.571376), (37.074945, 22. 41,534, 1.2, 9 4,731), (37.074945, 22.4,15,677, 5.7,53,062), (37.074945, 22.4,16,014, 7.519, 850)] (I can also describe in a bit more, I would say that if one list is in my list If you have thought about it in the form of ricks, then it would be the tenth of the lines and the tenth of the three columns.
Good alignment functions in the sage are not built-in. If you are ready to think of your list as a matrix, then you
sage: matrix (B) [37.074 9 450000000 9 .756234000000000] [37.074 9 450000000 22.4146650000000 1.66921400000000] 22.4153400000000 1.29473100000000] [37.0749450000000 22.4156770000000 5.75306200000000] [37.0749450000000 22.4160140000000 7.51985000000000] for commas and Other sentence pieces are missing, but it is aligned properly. If you are ready to work with HTML output, you can do html.table (B) . In the future (see) in general should be a good "table" function for such a good display.
Comments
Post a Comment