1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-07-09 01:05:53 +02:00

add underscores to column examples

This commit is contained in:
Kelly Brazil
2022-03-11 10:25:24 -08:00
parent 54e8f58145
commit dd052e0146
2 changed files with 26 additions and 24 deletions

View File

@ -23,16 +23,16 @@ may contain data with spaces.
Example Table:
col1 col2 col3 col4 col5
col_1 col_2 col_3 col_4 col_5
apple orange pear banana my favorite fruits
carrot squash celery spinach my favorite veggies
chicken beef pork eggs my favorite proteins
[{'col1': 'apple', 'col2': 'orange', 'col3': 'pear', 'col4':
'banana', 'col5': 'my favorite fruits'}, {'col1': 'carrot', 'col2':
'squash', 'col3': 'celery', 'col4': 'spinach', 'col5':
'my favorite veggies'}, {'col1': 'chicken', 'col2': 'beef', 'col3':
'pork', 'col4': 'eggs', 'col5': 'my favorite proteins'}]
[{'col_1': 'apple', 'col_2': 'orange', 'col_3': 'pear', 'col_4':
'banana', 'col_5': 'my favorite fruits'}, {'col_1': 'carrot',
'col_2': 'squash', 'col_3': 'celery', 'col_4': 'spinach', 'col_5':
'my favorite veggies'}, {'col_1': 'chicken', 'col_2': 'beef',
'col_3': 'pork', 'col_4': 'eggs', 'col_5': 'my favorite proteins'}]
Parameters:
@ -63,16 +63,17 @@ elements must line up within column boundaries.
Example Table:
col1 col2 col3 col4 col5
col_1 col_2 col_3 col_4 col_5
apple orange fuzzy peach my favorite fruits
green beans celery spinach my favorite veggies
chicken beef brown eggs my favorite proteins
[{'col1': 'apple', 'col2': 'orange', 'col3': None, 'col4':
'fuzzy peach', 'col5': 'my favorite fruits'}, {'col1':
'green beans', 'col2': None, 'col3': 'celery', 'col4': 'spinach',
'col5': 'my favorite veggies'}, {'col1': 'chicken', 'col2': 'beef',
'col3': None, 'col4': 'brown eggs', 'col5': 'my favorite proteins'}]
[{'col_1': 'apple', 'col_2': 'orange', 'col_3': None, 'col_4':
'fuzzy peach', 'col_5': 'my favorite fruits'}, {'col_1':
'green beans', 'col_2': None, 'col_3': 'celery', 'col_4': 'spinach',
'col_5': 'my favorite veggies'}, {'col_1': 'chicken', 'col_2':
'beef', 'col_3': None, 'col_4': 'brown eggs', 'col_5':
'my favorite proteins'}]
Parameters:

View File

@ -12,16 +12,16 @@ def simple_table_parse(data: List[str]) -> List[Dict]:
Example Table:
col1 col2 col3 col4 col5
col_1 col_2 col_3 col_4 col_5
apple orange pear banana my favorite fruits
carrot squash celery spinach my favorite veggies
chicken beef pork eggs my favorite proteins
[{'col1': 'apple', 'col2': 'orange', 'col3': 'pear', 'col4':
'banana', 'col5': 'my favorite fruits'}, {'col1': 'carrot', 'col2':
'squash', 'col3': 'celery', 'col4': 'spinach', 'col5':
'my favorite veggies'}, {'col1': 'chicken', 'col2': 'beef', 'col3':
'pork', 'col4': 'eggs', 'col5': 'my favorite proteins'}]
[{'col_1': 'apple', 'col_2': 'orange', 'col_3': 'pear', 'col_4':
'banana', 'col_5': 'my favorite fruits'}, {'col_1': 'carrot',
'col_2': 'squash', 'col_3': 'celery', 'col_4': 'spinach', 'col_5':
'my favorite veggies'}, {'col_1': 'chicken', 'col_2': 'beef',
'col_3': 'pork', 'col_4': 'eggs', 'col_5': 'my favorite proteins'}]
Parameters:
@ -55,16 +55,17 @@ def sparse_table_parse(data: List[str], delim: str = '\u2063') -> List[Dict]:
Example Table:
col1 col2 col3 col4 col5
col_1 col_2 col_3 col_4 col_5
apple orange fuzzy peach my favorite fruits
green beans celery spinach my favorite veggies
chicken beef brown eggs my favorite proteins
[{'col1': 'apple', 'col2': 'orange', 'col3': None, 'col4':
'fuzzy peach', 'col5': 'my favorite fruits'}, {'col1':
'green beans', 'col2': None, 'col3': 'celery', 'col4': 'spinach',
'col5': 'my favorite veggies'}, {'col1': 'chicken', 'col2': 'beef',
'col3': None, 'col4': 'brown eggs', 'col5': 'my favorite proteins'}]
[{'col_1': 'apple', 'col_2': 'orange', 'col_3': None, 'col_4':
'fuzzy peach', 'col_5': 'my favorite fruits'}, {'col_1':
'green beans', 'col_2': None, 'col_3': 'celery', 'col_4': 'spinach',
'col_5': 'my favorite veggies'}, {'col_1': 'chicken', 'col_2':
'beef', 'col_3': None, 'col_4': 'brown eggs', 'col_5':
'my favorite proteins'}]
Parameters: