1- # Mecsimcalc 0.0.4 documentation
1+ # Mecsimcalc 0.0.5 documentation
22
33This library is designed to provide a set of functions for handling and converting various types of data, such as base64 encoded data, Pandas DataFrames, and Pillow images.
44
@@ -7,9 +7,9 @@ This library is designed to provide a set of functions for handling and converti
77
88## General
99
10- <div style ={{ display: ' flex', justifyContent: ' space-between', alignItems: ' center' }} >
11- <h3 style ={{ margin: 5, padding: 0 }} >decode_file_data</h3 >
12- <a href="https://github.com/MecSimCalc/MecSimCalc-utils/blob/main/mecsimcalc/input_utils.py#LL8C1-L30C1 " style={{ fontSize: ' larger', marginBottom: ' 2em', margin: 5, padding: 0 }} ><strong >[ Source] </strong ></a >
10+ <div style =" display : flex ; justify-content : space-between ; align-items : center ; " >
11+ <h3 style =" margin : 5 px ; padding : 0 ; " >decode_file_data</h3 >
12+ <a href =" https://github.com/MecSimCalc/MecSimCalc-utils/blob/main/mecsimcalc/input_utils.py#LL8C1-L30C1 " style =" font-size : larger ; margin-bottom : 2em ; margin : 5 px ; padding : 0 ; " ><strong >[ Source] </strong ></a >
1313</div >
1414
1515``` python
@@ -45,9 +45,9 @@ data:image/jpeg;base64,
4545< class ' _io.BytesIO' >
4646```
4747
48- <div style ={{ display: ' flex', justifyContent: ' space-between', alignItems: ' center' }} >
49- <h3 style ={{ margin: 5, padding: 0 }} >download_text</h3 >
50- <a href="https://github.com/MecSimCalc/MecSimCalc-utils/blob/main/mecsimcalc/output_utils.py#LL182C1-L214C1 " style={{ fontSize: ' larger', marginBottom: ' 2em', margin: 5, padding: 0 }} ><strong >[ Source] </strong ></a >
48+ <div style =" display : flex ; justify-content : space-between ; align-items : center ; " >
49+ <h3 style =" margin : 5 px ; padding : 0 ; " >download_text</h3 >
50+ <a href =" https://github.com/MecSimCalc/MecSimCalc-utils/blob/main/mecsimcalc/output_utils.py#LL182C1-L214C1 " style =" font-size : larger ; margin-bottom : 2em ; margin : 5 px ; padding : 0 ; " ><strong >[ Source] </strong ></a >
5151</div >
5252
5353``` python
@@ -96,9 +96,9 @@ Generates a downloadable text file containing the given text
9696
9797## Tables/DataFrames
9898
99- <div style ={{ display: ' flex', justifyContent: ' space-between', alignItems: ' center' }} >
100- <h3 style ={{ margin: 5, padding: 0 }} >file_to_dataframe</h3 >
101- <a href="https://github.com/MecSimCalc/MecSimCalc-utils/blob/main/mecsimcalc/input_utils.py#LL32C1-L52C14 " style={{ fontSize: ' larger', marginBottom: ' 2em', margin: 5, padding: 0 }} ><strong >[ Source] </strong ></a >
99+ <div style =" display : flex ; justify-content : space-between ; align-items : center ; " >
100+ <h3 style =" margin : 5 px ; padding : 0 ; " >file_to_dataframe</h3 >
101+ <a href =" https://github.com/MecSimCalc/MecSimCalc-utils/blob/main/mecsimcalc/input_utils.py#LL32C1-L52C14 " style =" font-size : larger ; margin-bottom : 2em ; margin : 5 px ; padding : 0 ; " ><strong >[ Source] </strong ></a >
102102</div >
103103
104104``` python
@@ -139,9 +139,9 @@ Converts a file object into a pandas DataFrame
1391391 d e f
140140```
141141
142- <div style ={{ display: ' flex', justifyContent: ' space-between', alignItems: ' center' }} >
143- <h3 style ={{ margin: 5, padding: 0 }} >input_to_dataframe</h3 >
144- <a href="https://github.com/MecSimCalc/MecSimCalc-utils/blob/main/mecsimcalc/input_utils.py#LL55C1-L67C39 " style={{ fontSize: ' larger', marginBottom: ' 2em', margin: 5, padding: 0 }} ><strong >[ Source] </strong ></a >
142+ <div style =" display : flex ; justify-content : space-between ; align-items : center ; " >
143+ <h3 style =" margin : 5 px ; padding : 0 ; " >input_to_dataframe</h3 >
144+ <a href =" https://github.com/MecSimCalc/MecSimCalc-utils/blob/main/mecsimcalc/input_utils.py#LL55C1-L67C39 " style =" font-size : larger ; margin-bottom : 2em ; margin : 5 px ; padding : 0 ; " ><strong >[ Source] </strong ></a >
145145</div >
146146
147147``` python
@@ -175,9 +175,9 @@ Converts a base64 encoded file data into a pandas DataFrame
1751751 d e f
176176```
177177
178- <div style ={{ display: ' flex', justifyContent: ' space-between', alignItems: ' center' }} >
179- <h3 style ={{ margin: 5, padding: 0 }} >print_dataframe</h3 >
180- <a href="https://github.com/MecSimCalc/MecSimCalc-utils/blob/main/mecsimcalc/output_utils.py#LL10C1-L67C39 " style={{ fontSize: ' larger', marginBottom: ' 2em', margin: 5, padding: 0 }} ><strong >[ Source] </strong ></a >
178+ <div style =" display : flex ; justify-content : space-between ; align-items : center ; " >
179+ <h3 style =" margin : 5 px ; padding : 0 ; " >print_dataframe</h3 >
180+ <a href =" https://github.com/MecSimCalc/MecSimCalc-utils/blob/main/mecsimcalc/output_utils.py#LL10C1-L67C39 " style =" font-size : larger ; margin-bottom : 2em ; margin : 5 px ; padding : 0 ; " ><strong >[ Source] </strong ></a >
181181</div >
182182
183183``` python
@@ -237,9 +237,9 @@ Downloading Table
237237{{ outputs.download }}
238238```
239239
240- <div style ={{ display: ' flex', justifyContent: ' space-between', alignItems: ' center' }} >
241- <h3 style ={{ margin: 5, padding: 0 }} >table_to_dataframe</h3 >
242- <a href="https://github.com/MecSimCalc/MecSimCalc-utils/blob/main/mecsimcalc/input_utils.py#LL89C1-L105C35 " style={{ fontSize: ' larger', marginBottom: ' 2em', margin: 5, padding: 0 }} ><strong >[ Source] </strong ></a >
240+ <div style =" display : flex ; justify-content : space-between ; align-items : center ; " >
241+ <h3 style =" margin : 5 px ; padding : 0 ; " >table_to_dataframe</h3 >
242+ <a href="https://github.com/MecSimCalc/MecSimCalc-utils/blob/main/mecsimcalc/input_utils.py#LL89C1-L105C35 style="font-size: larger; margin-bottom: 2em; margin: 5px; padding: 0;" ><strong >[ Source] </strong ></a >
243243</div >
244244
245245``` python
@@ -273,42 +273,43 @@ Creates a DataFrame from given columns and headers
273273 A B C
2742740 a b c
2752751 d e f
276+
276277```
277278
278- <div style ={{ display: ' flex', justifyContent: ' space-between', alignItems: ' center' }} >
279- <h3 style ={{ margin: 5, padding: 0 }} >print_table</h3 >
280- <a href="https://github.com/MecSimCalc/MecSimCalc-utils/blob/main/mecsimcalc/output_utils.py#LL216C1-L240C114 " style={{ fontSize: ' larger', marginBottom: ' 2em', margin: 5, padding: 0 }} ><strong >[ Source] </strong ></a >
279+ <div style =" display : flex ; justify-content : space-between ; align-items : center ; " >
280+ <h3 style =" margin : 5 px ; padding : 0 ; " >print_table</h3 >
281+ <a href =" https://github.com/MecSimCalc/MecSimCalc-utils/blob/main/mecsimcalc/output_utils.py#LL216C1-L240C114 " style =" font-size : larger ; margin-bottom : 2em ; margin : 5 px ; padding : 0 ; " ><strong >[ Source] </strong ></a >
281282</div >
282283
283284``` python
284- print_table(columns : List[List[str ]], column_headers: List[str ]):
285+ print_table(rows : List[List[str ]], column_headers: List[str ]):
285286```
286287
287288#### Description:
288289
289- Creates an HTML table from given columns and headers
290+ Creates an HTML table from given rows and column headers
290291
291292#### Arguments:
292293
293- | Argument | Type | Description |
294- | -------------------- | ------------------- | ------------------------------------------------------------------------------ |
295- | ** ` columns ` ** | ** List[ List[ str]] ** | List of columns to be converted into a table. Each column is a list of strings |
296- | ** ` column_headers ` ** | ** List[ str] ** | List of column headers |
294+ | Argument | Type | Description |
295+ | -------------------- | ------------------- | --------------------------------------------------------------------------- |
296+ | ** ` rows ` ** | ** List[ List[ str]] ** | List of rows to be converted into a table. Each column is a list of strings |
297+ | ** ` column_headers ` ** | ** List[ str] ** | List of column headers |
297298
298299#### Returns:
299300
300- | Return Type | Description |
301- | ----------- | ------------------------------------------- |
302- | ** ` str ` ** | HTML table created from columns and headers |
301+ | Return Type | Description |
302+ | ----------- | ---------------------------------------- |
303+ | ** ` str ` ** | HTML table created from rows and headers |
303304
304305#### Example:
305306
306307#### Python Code:
307308
308309``` python
309- >> > columns = [[" a" , " b" , " c" ], [" d" , " e" , " f" ]]
310+ >> > rows = [[" a" , " b" , " c" ], [" d" , " e" , " f" ]]
310311>> > column_headers = [" A" , " B" , " C" ]
311- >> > table = print_table(columns , column_headers)
312+ >> > table = print_table(rows , column_headers)
312313>> > return {
313314 " table" :table,
314315 }
@@ -324,9 +325,9 @@ Displaying Table
324325
325326## Images
326327
327- <div style ={{ display: ' flex', justifyContent: ' space-between', alignItems: ' center' }} >
328- <h3 style ={{ margin: 5, padding: 0 }} >input_to_PIL</h3 >
329- <a href="https://github.com/MecSimCalc/MecSimCalc-utils/blob/main/mecsimcalc/input_utils.py#LL70C1-L87C1 " style={{ fontSize: ' larger', marginBottom: ' 2em', margin: 5, padding: 0 }} ><strong >[ Source] </strong ></a >
328+ <div style =" display : flex ; justify-content : space-between ; align-items : center ; " >
329+ <h3 style =" margin : 5 px ; padding : 0 ; " >input_to_PIL</h3 >
330+ <a href =" https://github.com/MecSimCalc/MecSimCalc-utils/blob/main/mecsimcalc/input_utils.py#LL70C1-L87C1 " style =" font-size : larger ; margin-bottom : 2em ; margin : 5 px ; padding : 0 ; " ><strong >[ Source] </strong ></a >
330331</div >
331332
332333``` python
@@ -360,9 +361,9 @@ data:image/jpeg;base64,
360361< class ' PIL.JpegImagePlugin.JpegImageFile' >
361362```
362363
363- <div style ={{ display: ' flex', justifyContent: ' space-between', alignItems: ' center' }} >
364- <h3 style ={{ margin: 5, padding: 0 }} >print_img</h3 >
365- <a href="https://github.com/MecSimCalc/MecSimCalc-utils/blob/main/mecsimcalc/output_utils.py#LL70C1-L129C1 " style={{ fontSize: ' larger', marginBottom: ' 2em', margin: 5, padding: 0 }} ><strong >[ Source] </strong ></a >
364+ <div style =" display : flex ; justify-content : space-between ; align-items : center ; " >
365+ <h3 style =" margin : 5 px ; padding : 0 ; " >print_img</h3 >
366+ <a href="https://github.com/MecSimCalc/MecSimCalc-utils/blob/main/mecsimcalc/output_utils.py#LL70C1-L129C1 style="font-size: larger; margin-bottom: 2em; margin: 5px; padding: 0;" ><strong >[ Source] </strong ></a >
366367</div >
367368
368369``` python
@@ -428,9 +429,9 @@ Downloading Image
428429{{ outputs.download }}
429430```
430431
431- <div style ={{ display: ' flex', justifyContent: ' space-between', alignItems: ' center' }} >
432- <h3 style ={{ margin: 5, padding: 0 }} >print_plt</h3 >
433- <a href="https://github.com/MecSimCalc/MecSimCalc-utils/blob/main/mecsimcalc/output_utils.py#LL131C1-L180C1 " style={{ fontSize: ' larger', marginBottom: ' 2em', margin: 5, padding: 0 }} ><strong >[ Source] </strong ></a >
432+ <div style =" display : flex ; justify-content : space-between ; align-items : center ; " >
433+ <h3 style =" margin : 5 px ; padding : 0 ; " >print_plt</h3 >
434+ <a href =" https://github.com/MecSimCalc/MecSimCalc-utils/blob/main/mecsimcalc/output_utils.py#LL131C1-L180C1 " style =" font-size : larger ; margin-bottom : 2em ; margin : 5 px ; padding : 0 ; " ><strong >[ Source] </strong ></a >
434435</div >
435436
436437``` python
0 commit comments