listorm


Namelistorm JSON
Version 1.3.3 PyPI version JSON
download
home_pagehttps://github.com/zwolf21/listorm
Summarylist orm methods and shortcuts for table type of dict-list
upload_time2023-11-12 19:17:09
maintainer
docs_urlNone
authorHS Moon
requires_python>=3.8
licenseMIT
keywords listorm list of dict dict list records sql orm
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## Note: This documentation is for older version of listorm as 0.x.x

## [View documentation of listorm after version 1.0](https://zwolf21.github.io/listorm/)

----

### Installation of older version
`pip install listorm==0.2.16`

----

```python
import listorm as ls
```

1-1. Basic useage - create a Listorm Object

1)Listorm Ojbect is derived from list

2)The Elements of Listorm Object is 'Scheme' derived from dict


```python
scheme1 = ls.Scheme({'name': 'park', 'age': 15, 'phone':None})
scheme2 = ls.Scheme({'name': 'kim', 'age':5, 'location': 'Seoul', 'phone': '111-222-333'})
```


```python
# if add operating smart overwrite (overwrite if value is none on Same key)
scheme1+scheme2
```




    {'age': 15, 'location': 'Seoul', 'name': 'park', 'phone': '111-222-333'}




```python
# The List within different key of dict
lst = [
    {'name': 'Hong', 'age': 18, 'location': 'Korea'},
    {'name': 'Yuki', 'age': 19,},
    {'name': 'Lee', 'age': 12, 'phone': '010-2451-1532'},   
]
```


```python
# Auto normailize: set same keys for each record(set to None if key does not exists)
ls.Listorm(lst)
```




    [{'age': 18, 'location': 'Korea', 'name': 'Hong', 'phone': None},
     {'age': 19, 'location': None, 'name': 'Yuki', 'phone': None},
     {'age': 12, 'location': None, 'name': 'Lee', 'phone': '010-2451-1532'}]



1-2. Basic useage - retrieve and parsing data


```python
# Customer's info in a Shopping mall
userTable = [
    {'name': 'Hong', 'gender': 'M', 'age': 18, 'location': 'Korea'},
    {'name': 'Charse', 'gender': 'M', 'age': 19, 'location': 'USA'},
    {'name': 'Lyn', 'gender': 'F', 'age': 28, 'location': 'China'},
    {'name': 'Xiaomi', 'gender': 'M', 'age': 15, 'location': 'China'},
    {'name': 'Park', 'gender': 'M', 'age': 29, 'location': 'Korea'},
    {'name': 'Smith', 'gender': 'M', 'age': 17, 'location': 'USA'},
    {'name': 'Lee', 'gender': 'F', 'age': 12, 'location': 'Korea'},
]
```


```python
#select Columns
lst_customer = ls.Listorm(userTable)
lst_customer.select('name', 'location')
```




    [{'location': 'Korea', 'name': 'Hong'},
     {'location': 'USA', 'name': 'Charse'},
     {'location': 'China', 'name': 'Lyn'},
     {'location': 'China', 'name': 'Xiaomi'},
     {'location': 'Japan', 'name': 'Yuki'},
     {'location': 'Korea', 'name': 'Park'},
     {'location': 'USA', 'name': 'Smith'},
     {'location': 'Korea', 'name': 'Lee'}]




```python
#select Columns only with values, 2dArry
lst_customer = ls.Listorm(userTable)
lst_customer.select('name', 'location', values=True)
```




    [('Hong', 'Korea'),
     ('Charse', 'USA'),
     ('Lyn', 'China'),
     ('Xiaomi', 'China'),
     ('Yuki', 'Japan'),
     ('Park', 'Korea'),
     ('Smith', 'USA'),
     ('Lee', 'Korea')]




```python
#select Columns only with values, Similar to select(*args, values=True)
lst_customer = ls.Listorm(userTable)
lst_customer.row_values('name', 'location')
```




    [['Hong', 'Korea'],
     ['Charse', 'USA'],
     ['Lyn', 'China'],
     ['Xiaomi', 'China'],
     ['Yuki', 'Japan'],
     ['Park', 'Korea'],
     ['Smith', 'USA'],
     ['Lee', 'Korea']]




```python
#filtering
lst_customer = ls.Listorm(userTable)
lst_customer.filter(where=lambda row:row.age > 18)
```




    [{'age': 19, 'gender': 'M', 'location': 'USA', 'name': 'Charse'},
     {'age': 28, 'gender': 'F', 'location': 'China', 'name': 'Lyn'},
     {'age': 19, 'gender': 'F', 'location': 'Japan', 'name': 'Yuki'},
     {'age': 29, 'gender': 'M', 'location': 'Korea', 'name': 'Park'}]




```python
# With Method Chaining
lst_customer = ls.Listorm(userTable)
lst_customer.select('name', 'location', 'age').filter(where=lambda row:row['age'] > 18)
```




    [{'age': 19, 'location': 'USA', 'name': 'Charse'},
     {'age': 28, 'location': 'China', 'name': 'Lyn'},
     {'age': 19, 'location': 'Japan', 'name': 'Yuki'},
     {'age': 29, 'location': 'Korea', 'name': 'Park'}]




```python
# Get a Column values
lst_customer = ls.Listorm(userTable)
lst_customer.column_values('age')
```




    [18, 19, 28, 15, 19, 29, 17, 12]




```python
# Get a Column values unique
lst_customer = ls.Listorm(userTable)
lst_customer.unique('location')
```




    {'China', 'Japan', 'Korea', 'USA'}




```python
# Get a Column values count
lst_customer = ls.Listorm(userTable)
lst_customer.value_count('location')
```




    Counter({'China': 2, 'Japan': 1, 'Korea': 3, 'USA': 2})



2. Basic useage - modifying and update data


```python
# change number type
numbers = [
    {'flt': 0.5, 'string': '123', 'string_float': '123.5', 
     'int': 412, 'string_int': '5123', 'blabla': 'what?'
    }
]

lst_numbers = ls.Listorm(numbers)

# column name and example of types to change, if faild to change, example value will be default value
lst_numbers.set_number_type(flt='', string=0.0, string_float=0, int='', string_int=0, blabla=0)
```




    [{'blabla': 0,
      'flt': '0.5',
      'int': '412',
      'string': 123.0,
      'string_float': 123,
      'string_int': 5123}]




```python
# modify by record qpplied function
lst_customer = ls.Listorm(userTable)
lst_customer.apply_row(
    age= lambda row:'{}_{}'.format(row.gender, row.age),
    name = lambda row:'{}_{}_{}'.format(row.gender, row.age, row.name),
)
```




    [{'age': 'M_18', 'gender': 'M', 'location': 'Korea', 'name': 'M_M_18_Hong'},
     {'age': 'M_19', 'gender': 'M', 'location': 'USA', 'name': 'M_M_19_Charse'},
     {'age': 'F_28', 'gender': 'F', 'location': 'China', 'name': 'F_F_28_Lyn'},
     {'age': 'M_15', 'gender': 'M', 'location': 'China', 'name': 'M_M_15_Xiaomi'},
     {'age': 'F_19', 'gender': 'F', 'location': 'Japan', 'name': 'F_F_19_Yuki'},
     {'age': 'M_29', 'gender': 'M', 'location': 'Korea', 'name': 'M_M_29_Park'},
     {'age': 'M_17', 'gender': 'M', 'location': 'USA', 'name': 'M_M_17_Smith'},
     {'age': 'F_12', 'gender': 'F', 'location': 'Korea', 'name': 'F_F_12_Lee'}]




```python
# modify by value only applied function
lst_customer = ls.Listorm(userTable)
lst_customer.map(gender=lambda val:{'M':'Male', 'F':'Female'}.get(val, val))
```




    [{'age': 18, 'gender': 'Male', 'location': 'Korea', 'name': 'Hong'},
     {'age': 19, 'gender': 'Male', 'location': 'USA', 'name': 'Charse'},
     {'age': 28, 'gender': 'Female', 'location': 'China', 'name': 'Lyn'},
     {'age': 15, 'gender': 'Male', 'location': 'China', 'name': 'Xiaomi'},
     {'age': 19, 'gender': 'Female', 'location': 'Japan', 'name': 'Yuki'},
     {'age': 29, 'gender': 'Male', 'location': 'Korea', 'name': 'Park'},
     {'age': 17, 'gender': 'Male', 'location': 'USA', 'name': 'Smith'},
     {'age': 12, 'gender': 'Female', 'location': 'Korea', 'name': 'Lee'}]




```python
# rename columns
lst_customer = ls.Listorm(userTable)
lst_customer.rename(name='who', location='nation')
```




    [{'age': 18, 'gender': 'M', 'nation': 'Korea', 'who': 'Hong'},
     {'age': 19, 'gender': 'M', 'nation': 'USA', 'who': 'Charse'},
     {'age': 28, 'gender': 'F', 'nation': 'China', 'who': 'Lyn'},
     {'age': 15, 'gender': 'M', 'nation': 'China', 'who': 'Xiaomi'},
     {'age': 19, 'gender': 'F', 'nation': 'Japan', 'who': 'Yuki'},
     {'age': 29, 'gender': 'M', 'nation': 'Korea', 'who': 'Park'},
     {'age': 17, 'gender': 'M', 'nation': 'USA', 'who': 'Smith'},
     {'age': 12, 'gender': 'F', 'nation': 'Korea', 'who': 'Lee'}]




```python
# adding new columns by record applied function
lst_customer = ls.Listorm(userTable)
lst_customer.add_columns(is_child=lambda row:row.age<15).select('name', 'age', 'is_child')
```




    [{'age': 18, 'is_child': False, 'name': 'Hong'},
     {'age': 19, 'is_child': False, 'name': 'Charse'},
     {'age': 28, 'is_child': False, 'name': 'Lyn'},
     {'age': 15, 'is_child': False, 'name': 'Xiaomi'},
     {'age': 19, 'is_child': False, 'name': 'Yuki'},
     {'age': 29, 'is_child': False, 'name': 'Park'},
     {'age': 17, 'is_child': False, 'name': 'Smith'},
     {'age': 12, 'is_child': True, 'name': 'Lee'}]




```python
# get top of records by N
lst_customer = ls.Listorm(userTable)
lst_customer.top('age', n=2) # get oldest 2 people in Listorm
```




    [{'age': 29, 'gender': 'M', 'location': 'Korea', 'name': 'Park'},
     {'age': 28, 'gender': 'F', 'location': 'China', 'name': 'Lyn'}]




```python
# get top of records by percentage(if 0<n<1)
lst_customer = ls.Listorm(userTable)
lst_customer.top('age', n=0.5) # get oldest people by top 50% of age
```




    [{'age': 29, 'gender': 'M', 'location': 'Korea', 'name': 'Park'},
     {'age': 28, 'gender': 'F', 'location': 'China', 'name': 'Lyn'},
     {'age': 19, 'gender': 'M', 'location': 'USA', 'name': 'Charse'},
     {'age': 19, 'gender': 'F', 'location': 'Japan', 'name': 'Yuki'}]



3 . Advanced useage - sorting, grouping, join


```python
# 1.orderby location ASC age DESC
lst_customer = ls.Listorm(userTable)
lst_customer.orderby('location', '-age')
```




    [{'age': 28, 'gender': 'F', 'location': 'China', 'name': 'Lyn'},
     {'age': 15, 'gender': 'M', 'location': 'China', 'name': 'Xiaomi'},
     {'age': 19, 'gender': 'F', 'location': 'Japan', 'name': 'Yuki'},
     {'age': 29, 'gender': 'M', 'location': 'Korea', 'name': 'Park'},
     {'age': 18, 'gender': 'M', 'location': 'Korea', 'name': 'Hong'},
     {'age': 12, 'gender': 'F', 'location': 'Korea', 'name': 'Lee'},
     {'age': 19, 'gender': 'M', 'location': 'USA', 'name': 'Charse'},
     {'age': 17, 'gender': 'M', 'location': 'USA', 'name': 'Smith'}]




```python
# 2-1groupby location, retrieve gender count and max age
lst_customer = ls.Listorm(userTable)
lst_customer.groupby('location', age=max, gender=len)
```




    [{'age': 28, 'gender': 2, 'location': 'China'},
     {'age': 19, 'gender': 1, 'location': 'Japan'},
     {'age': 29, 'gender': 3, 'location': 'Korea'},
     {'age': 19, 'gender': 2, 'location': 'USA'}]




```python
# 2-2.you can rename retrieving columns name which set by grouped result 
lst_customer = ls.Listorm(userTable)
lst_customer.groupby('location', 
            age=max, gender=len, location=len, 
            renames={'age':'Oldest', 'gender': 'GenderCount', 'location': 'locationCount'}
    )
```




    [{'GenderCount': 2, 'Oldest': 28, 'locationCount': 2},
     {'GenderCount': 1, 'Oldest': 19, 'locationCount': 1},
     {'GenderCount': 3, 'Oldest': 29, 'locationCount': 3},
     {'GenderCount': 2, 'Oldest': 19, 'locationCount': 2}]




```python
# 2-2.you can include extra column value(value might be last record of group)
lst_customer = ls.Listorm(userTable)
lst_customer.groupby('location',
            age=max, gender=len, location=len, 
            renames={'age':'Oldest', 'gender': 'GenderCount', 'location': 'locationCount'},
            extra_columns = ['location']
    )
```




    [{'GenderCount': 2, 'Oldest': 28, 'location': 'China', 'locationCount': 2},
     {'GenderCount': 1, 'Oldest': 19, 'location': 'Japan', 'locationCount': 1},
     {'GenderCount': 3, 'Oldest': 29, 'location': 'Korea', 'locationCount': 3},
     {'GenderCount': 2, 'Oldest': 19, 'location': 'USA', 'locationCount': 2}]




```python
# 3.join
#Customers buy records for join Example
buyTable = [
    {'name': 'Xiaomi', 'product': 'battery', 'amount':7},
    {'name': 'Hong', 'product': 'keyboard', 'amount':1},
    {'name': 'Lyn', 'product': 'cleaner', 'amount':5},
    {'name': 'Hong', 'product': 'monitor', 'amount':1},
    {'name': 'Hong', 'product': 'mouse', 'amount':3},
    {'name': 'Lyn', 'product': 'mouse', 'amount':1},
    {'name': 'Unknown', 'product': 'keyboard', 'amount':1},
    {'name': 'Lee', 'product': 'hardcase', 'amount':2},
    {'name': 'Lee', 'product': 'keycover', 'amount':2},
    {'name': 'Yuki', 'product': 'manual', 'amount':1},
    {'name': 'Xiaomi', 'product': 'cable', 'amount':1},
    {'name': 'anonymous', 'product': 'adopter', 'amount':2},
    {'name': 'Park', 'product': 'battery', 'amount':2},
    {'name': 'Hong', 'product': 'cleaner', 'amount':3},
    {'name': 'Smith', 'product': 'mouse', 'amount':1},
]
```


```python
lst_customer = ls.Listorm(userTable)
lst_buyitems = ls.Listorm(buyTable)
```


```python
# 3-1 inner join
# Add Extra customer's Info (location) to each buytime
lst_buyitems.join(lst_customer.select('location', 'name'), on='name')
```




    [{'amount': 1, 'location': 'Japan', 'name': 'Yuki', 'product': 'manual'},
     {'amount': 1, 'location': 'USA', 'name': 'Smith', 'product': 'mouse'},
     {'amount': 2, 'location': 'Korea', 'name': 'Lee', 'product': 'hardcase'},
     {'amount': 2, 'location': 'Korea', 'name': 'Lee', 'product': 'keycover'},
     {'amount': 7, 'location': 'China', 'name': 'Xiaomi', 'product': 'battery'},
     {'amount': 1, 'location': 'China', 'name': 'Xiaomi', 'product': 'cable'},
     {'amount': 1, 'location': 'Korea', 'name': 'Hong', 'product': 'keyboard'},
     {'amount': 1, 'location': 'Korea', 'name': 'Hong', 'product': 'monitor'},
     {'amount': 3, 'location': 'Korea', 'name': 'Hong', 'product': 'mouse'},
     {'amount': 3, 'location': 'Korea', 'name': 'Hong', 'product': 'cleaner'},
     {'amount': 2, 'location': 'Korea', 'name': 'Park', 'product': 'battery'},
     {'amount': 5, 'location': 'China', 'name': 'Lyn', 'product': 'cleaner'},
     {'amount': 1, 'location': 'China', 'name': 'Lyn', 'product': 'mouse'}]




```python
# 3-2 left join
# if names in buy table are not in customer table, then set to none the customer's info(location is set to none)
lst_buyitems.join(lst_customer.select('location', 'name'), on='name', how='left')
# Unknown and anonymouse location would be set to None
```




    [{'amount': 1, 'location': 'Korea', 'name': 'Hong', 'product': 'keyboard'},
     {'amount': 1, 'location': 'Korea', 'name': 'Hong', 'product': 'monitor'},
     {'amount': 3, 'location': 'Korea', 'name': 'Hong', 'product': 'mouse'},
     {'amount': 3, 'location': 'Korea', 'name': 'Hong', 'product': 'cleaner'},
     {'amount': 2, 'location': 'Korea', 'name': 'Lee', 'product': 'hardcase'},
     {'amount': 2, 'location': 'Korea', 'name': 'Lee', 'product': 'keycover'},
     {'amount': 5, 'location': 'China', 'name': 'Lyn', 'product': 'cleaner'},
     {'amount': 1, 'location': 'China', 'name': 'Lyn', 'product': 'mouse'},
     {'amount': 2, 'location': 'Korea', 'name': 'Park', 'product': 'battery'},
     {'amount': 1, 'location': 'USA', 'name': 'Smith', 'product': 'mouse'},
     {'amount': 1, 'location': None, 'name': 'Unknown', 'product': 'keyboard'},
     {'amount': 7, 'location': 'China', 'name': 'Xiaomi', 'product': 'battery'},
     {'amount': 1, 'location': 'China', 'name': 'Xiaomi', 'product': 'cable'},
     {'amount': 1, 'location': 'Japan', 'name': 'Yuki', 'product': 'manual'},
     {'amount': 2, 'location': None, 'name': 'anonymous', 'product': 'adopter'}]




```python
# 3-3 outer join
lst_buyitems.join(lst_customer.select('location', 'name'), on='name', how='outer')
```




    [{'amount': None, 'location': 'USA', 'name': 'Charse', 'product': None},
     {'amount': 1, 'location': 'Japan', 'name': 'Yuki', 'product': 'manual'},
     {'amount': 1, 'location': 'USA', 'name': 'Smith', 'product': 'mouse'},
     {'amount': 2, 'location': 'Korea', 'name': 'Lee', 'product': 'hardcase'},
     {'amount': 2, 'location': 'Korea', 'name': 'Lee', 'product': 'keycover'},
     {'amount': 7, 'location': 'China', 'name': 'Xiaomi', 'product': 'battery'},
     {'amount': 1, 'location': 'China', 'name': 'Xiaomi', 'product': 'cable'},
     {'amount': 1, 'location': None, 'name': 'Unknown', 'product': 'keyboard'},
     {'amount': 1, 'location': 'Korea', 'name': 'Hong', 'product': 'keyboard'},
     {'amount': 1, 'location': 'Korea', 'name': 'Hong', 'product': 'monitor'},
     {'amount': 3, 'location': 'Korea', 'name': 'Hong', 'product': 'mouse'},
     {'amount': 3, 'location': 'Korea', 'name': 'Hong', 'product': 'cleaner'},
     {'amount': 2, 'location': None, 'name': 'anonymous', 'product': 'adopter'},
     {'amount': 2, 'location': 'Korea', 'name': 'Park', 'product': 'battery'},
     {'amount': 5, 'location': 'China', 'name': 'Lyn', 'product': 'cleaner'},
     {'amount': 1, 'location': 'China', 'name': 'Lyn', 'product': 'mouse'}]



4-1.Utilities - Find Different in two different table - The Changed thing in table


```python
# changing to add two record, delete two record and modified a recored where name ==Lyn set age 28 
before = [
    {'name': 'Hong', 'gender': 'M', 'age': 18, 'location': 'Korea'},
    {'name': 'Charse', 'gender': 'M', 'age': 19, 'location': 'USA'},
    {'name': 'Lyn', 'gender': 'F', 'age': 29, 'location': 'China'},
]
after = [
    {'name': 'Lyn', 'gender': 'F', 'age': 28, 'location': 'China'},
    {'name': 'Xiaomi', 'gender': 'M', 'age': 15, 'location': 'China'},
    {'name': 'Park', 'gender': 'M', 'age': 29, 'location': 'Korea'},
]
```


```python
changes = ls.Listorm(before).get_changes(after, pk='name')
#pk: primary key is needed
```


```python
changes
```




    Changes(added=[Added(pk='Xiaomi', rows={'location': 'China', 'gender': 'M', 'name': 'Xiaomi', 'age': 15}), Added(pk='Park', rows={'location': 'Korea', 'gender': 'M', 'name': 'Park', 'age': 29})], deleted=[Deleted(pk='Hong', rows={'location': 'Korea', 'gender': 'M', 'name': 'Hong', 'age': 18}), Deleted(pk='Charse', rows={'location': 'USA', 'gender': 'M', 'name': 'Charse', 'age': 19})], updated=[Updated(pk='Lyn', before={'location': 'China', 'gender': 'F', 'name': 'Lyn', 'age': 29}, after={'location': 'China', 'gender': 'F', 'name': 'Lyn', 'age': 28}, where=['age'])])




```python
changes.added
```




    [Added(pk='Xiaomi', rows={'location': 'China', 'gender': 'M', 'name': 'Xiaomi', 'age': 15}),
     Added(pk='Park', rows={'location': 'Korea', 'gender': 'M', 'name': 'Park', 'age': 29})]




```python
changes.deleted
```




    [Deleted(pk='Hong', rows={'location': 'Korea', 'gender': 'M', 'name': 'Hong', 'age': 18}),
     Deleted(pk='Charse', rows={'location': 'USA', 'gender': 'M', 'name': 'Charse', 'age': 19})]




```python
changes.updated
```




    [Updated(pk='Lyn', before={'location': 'China', 'gender': 'F', 'name': 'Lyn', 'age': 29}, after={'location': 'China', 'gender': 'F', 'name': 'Lyn', 'age': 28}, where=['age'])]



4-2. Utilities - Read And Write to Excel, CSV

lst = ls.read_excel(file_name=None, file_contents=None, sheet_index=0, start_row=0, index=None)

Excel File or byte Content of Excel to Listorm object

lst = ls.read_csv(filename=None, encoding='utf-8',  fp=None, index=None)

CSV file or filepointer of CSV to Listorm object


```python
# saving date to excel or CSV
lst_customer = ls.Listorm(userTable)
excel_file_content = lst_customer.to_excel(filename=None) # If filnames is None, returns bytes of filecontents
csv_file_content = lst_customer.to_csv(filename=None) # If filnames is None, returns bytes of filecontents
```


```python

```
# listorm
# listorm

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/zwolf21/listorm",
    "name": "listorm",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "listorm,list of dict,dict list,records,sql,orm",
    "author": "HS Moon",
    "author_email": "pbr112@naver.com",
    "download_url": "https://files.pythonhosted.org/packages/0e/a2/9203a6acf2b5ce3dc31a1443fe9d638525b82aab64eea8d3ec8ebf444d15/listorm-1.3.3.tar.gz",
    "platform": null,
    "description": "## Note: This documentation is for older version of listorm as 0.x.x\r\n\r\n## [View documentation of listorm after version 1.0](https://zwolf21.github.io/listorm/)\r\n\r\n----\r\n\r\n### Installation of older version\r\n`pip install listorm==0.2.16`\r\n\r\n----\r\n\r\n```python\r\nimport listorm as ls\r\n```\r\n\r\n1-1. Basic useage - create a Listorm Object\r\n\r\n1)Listorm Ojbect is derived from list\r\n\r\n2)The Elements of Listorm Object is 'Scheme' derived from dict\r\n\r\n\r\n```python\r\nscheme1 = ls.Scheme({'name': 'park', 'age': 15, 'phone':None})\r\nscheme2 = ls.Scheme({'name': 'kim', 'age':5, 'location': 'Seoul', 'phone': '111-222-333'})\r\n```\r\n\r\n\r\n```python\r\n# if add operating smart overwrite (overwrite if value is none on Same key)\r\nscheme1+scheme2\r\n```\r\n\r\n\r\n\r\n\r\n    {'age': 15, 'location': 'Seoul', 'name': 'park', 'phone': '111-222-333'}\r\n\r\n\r\n\r\n\r\n```python\r\n# The List within different key of dict\r\nlst = [\r\n    {'name': 'Hong', 'age': 18, 'location': 'Korea'},\r\n    {'name': 'Yuki', 'age': 19,},\r\n    {'name': 'Lee', 'age': 12, 'phone': '010-2451-1532'},   \r\n]\r\n```\r\n\r\n\r\n```python\r\n# Auto normailize: set same keys for each record(set to None if key does not exists)\r\nls.Listorm(lst)\r\n```\r\n\r\n\r\n\r\n\r\n    [{'age': 18, 'location': 'Korea', 'name': 'Hong', 'phone': None},\r\n     {'age': 19, 'location': None, 'name': 'Yuki', 'phone': None},\r\n     {'age': 12, 'location': None, 'name': 'Lee', 'phone': '010-2451-1532'}]\r\n\r\n\r\n\r\n1-2. Basic useage - retrieve and parsing data\r\n\r\n\r\n```python\r\n# Customer's info in a Shopping mall\r\nuserTable = [\r\n    {'name': 'Hong', 'gender': 'M', 'age': 18, 'location': 'Korea'},\r\n    {'name': 'Charse', 'gender': 'M', 'age': 19, 'location': 'USA'},\r\n    {'name': 'Lyn', 'gender': 'F', 'age': 28, 'location': 'China'},\r\n    {'name': 'Xiaomi', 'gender': 'M', 'age': 15, 'location': 'China'},\r\n    {'name': 'Park', 'gender': 'M', 'age': 29, 'location': 'Korea'},\r\n    {'name': 'Smith', 'gender': 'M', 'age': 17, 'location': 'USA'},\r\n    {'name': 'Lee', 'gender': 'F', 'age': 12, 'location': 'Korea'},\r\n]\r\n```\r\n\r\n\r\n```python\r\n#select Columns\r\nlst_customer = ls.Listorm(userTable)\r\nlst_customer.select('name', 'location')\r\n```\r\n\r\n\r\n\r\n\r\n    [{'location': 'Korea', 'name': 'Hong'},\r\n     {'location': 'USA', 'name': 'Charse'},\r\n     {'location': 'China', 'name': 'Lyn'},\r\n     {'location': 'China', 'name': 'Xiaomi'},\r\n     {'location': 'Japan', 'name': 'Yuki'},\r\n     {'location': 'Korea', 'name': 'Park'},\r\n     {'location': 'USA', 'name': 'Smith'},\r\n     {'location': 'Korea', 'name': 'Lee'}]\r\n\r\n\r\n\r\n\r\n```python\r\n#select Columns only with values, 2dArry\r\nlst_customer = ls.Listorm(userTable)\r\nlst_customer.select('name', 'location', values=True)\r\n```\r\n\r\n\r\n\r\n\r\n    [('Hong', 'Korea'),\r\n     ('Charse', 'USA'),\r\n     ('Lyn', 'China'),\r\n     ('Xiaomi', 'China'),\r\n     ('Yuki', 'Japan'),\r\n     ('Park', 'Korea'),\r\n     ('Smith', 'USA'),\r\n     ('Lee', 'Korea')]\r\n\r\n\r\n\r\n\r\n```python\r\n#select Columns only with values, Similar to select(*args, values=True)\r\nlst_customer = ls.Listorm(userTable)\r\nlst_customer.row_values('name', 'location')\r\n```\r\n\r\n\r\n\r\n\r\n    [['Hong', 'Korea'],\r\n     ['Charse', 'USA'],\r\n     ['Lyn', 'China'],\r\n     ['Xiaomi', 'China'],\r\n     ['Yuki', 'Japan'],\r\n     ['Park', 'Korea'],\r\n     ['Smith', 'USA'],\r\n     ['Lee', 'Korea']]\r\n\r\n\r\n\r\n\r\n```python\r\n#filtering\r\nlst_customer = ls.Listorm(userTable)\r\nlst_customer.filter(where=lambda row:row.age > 18)\r\n```\r\n\r\n\r\n\r\n\r\n    [{'age': 19, 'gender': 'M', 'location': 'USA', 'name': 'Charse'},\r\n     {'age': 28, 'gender': 'F', 'location': 'China', 'name': 'Lyn'},\r\n     {'age': 19, 'gender': 'F', 'location': 'Japan', 'name': 'Yuki'},\r\n     {'age': 29, 'gender': 'M', 'location': 'Korea', 'name': 'Park'}]\r\n\r\n\r\n\r\n\r\n```python\r\n# With Method Chaining\r\nlst_customer = ls.Listorm(userTable)\r\nlst_customer.select('name', 'location', 'age').filter(where=lambda row:row['age'] > 18)\r\n```\r\n\r\n\r\n\r\n\r\n    [{'age': 19, 'location': 'USA', 'name': 'Charse'},\r\n     {'age': 28, 'location': 'China', 'name': 'Lyn'},\r\n     {'age': 19, 'location': 'Japan', 'name': 'Yuki'},\r\n     {'age': 29, 'location': 'Korea', 'name': 'Park'}]\r\n\r\n\r\n\r\n\r\n```python\r\n# Get a Column values\r\nlst_customer = ls.Listorm(userTable)\r\nlst_customer.column_values('age')\r\n```\r\n\r\n\r\n\r\n\r\n    [18, 19, 28, 15, 19, 29, 17, 12]\r\n\r\n\r\n\r\n\r\n```python\r\n# Get a Column values unique\r\nlst_customer = ls.Listorm(userTable)\r\nlst_customer.unique('location')\r\n```\r\n\r\n\r\n\r\n\r\n    {'China', 'Japan', 'Korea', 'USA'}\r\n\r\n\r\n\r\n\r\n```python\r\n# Get a Column values count\r\nlst_customer = ls.Listorm(userTable)\r\nlst_customer.value_count('location')\r\n```\r\n\r\n\r\n\r\n\r\n    Counter({'China': 2, 'Japan': 1, 'Korea': 3, 'USA': 2})\r\n\r\n\r\n\r\n2. Basic useage - modifying and update data\r\n\r\n\r\n```python\r\n# change number type\r\nnumbers = [\r\n    {'flt': 0.5, 'string': '123', 'string_float': '123.5', \r\n     'int': 412, 'string_int': '5123', 'blabla': 'what?'\r\n    }\r\n]\r\n\r\nlst_numbers = ls.Listorm(numbers)\r\n\r\n# column name and example of types to change, if faild to change, example value will be default value\r\nlst_numbers.set_number_type(flt='', string=0.0, string_float=0, int='', string_int=0, blabla=0)\r\n```\r\n\r\n\r\n\r\n\r\n    [{'blabla': 0,\r\n      'flt': '0.5',\r\n      'int': '412',\r\n      'string': 123.0,\r\n      'string_float': 123,\r\n      'string_int': 5123}]\r\n\r\n\r\n\r\n\r\n```python\r\n# modify by record qpplied function\r\nlst_customer = ls.Listorm(userTable)\r\nlst_customer.apply_row(\r\n    age= lambda row:'{}_{}'.format(row.gender, row.age),\r\n    name = lambda row:'{}_{}_{}'.format(row.gender, row.age, row.name),\r\n)\r\n```\r\n\r\n\r\n\r\n\r\n    [{'age': 'M_18', 'gender': 'M', 'location': 'Korea', 'name': 'M_M_18_Hong'},\r\n     {'age': 'M_19', 'gender': 'M', 'location': 'USA', 'name': 'M_M_19_Charse'},\r\n     {'age': 'F_28', 'gender': 'F', 'location': 'China', 'name': 'F_F_28_Lyn'},\r\n     {'age': 'M_15', 'gender': 'M', 'location': 'China', 'name': 'M_M_15_Xiaomi'},\r\n     {'age': 'F_19', 'gender': 'F', 'location': 'Japan', 'name': 'F_F_19_Yuki'},\r\n     {'age': 'M_29', 'gender': 'M', 'location': 'Korea', 'name': 'M_M_29_Park'},\r\n     {'age': 'M_17', 'gender': 'M', 'location': 'USA', 'name': 'M_M_17_Smith'},\r\n     {'age': 'F_12', 'gender': 'F', 'location': 'Korea', 'name': 'F_F_12_Lee'}]\r\n\r\n\r\n\r\n\r\n```python\r\n# modify by value only applied function\r\nlst_customer = ls.Listorm(userTable)\r\nlst_customer.map(gender=lambda val:{'M':'Male', 'F':'Female'}.get(val, val))\r\n```\r\n\r\n\r\n\r\n\r\n    [{'age': 18, 'gender': 'Male', 'location': 'Korea', 'name': 'Hong'},\r\n     {'age': 19, 'gender': 'Male', 'location': 'USA', 'name': 'Charse'},\r\n     {'age': 28, 'gender': 'Female', 'location': 'China', 'name': 'Lyn'},\r\n     {'age': 15, 'gender': 'Male', 'location': 'China', 'name': 'Xiaomi'},\r\n     {'age': 19, 'gender': 'Female', 'location': 'Japan', 'name': 'Yuki'},\r\n     {'age': 29, 'gender': 'Male', 'location': 'Korea', 'name': 'Park'},\r\n     {'age': 17, 'gender': 'Male', 'location': 'USA', 'name': 'Smith'},\r\n     {'age': 12, 'gender': 'Female', 'location': 'Korea', 'name': 'Lee'}]\r\n\r\n\r\n\r\n\r\n```python\r\n# rename columns\r\nlst_customer = ls.Listorm(userTable)\r\nlst_customer.rename(name='who', location='nation')\r\n```\r\n\r\n\r\n\r\n\r\n    [{'age': 18, 'gender': 'M', 'nation': 'Korea', 'who': 'Hong'},\r\n     {'age': 19, 'gender': 'M', 'nation': 'USA', 'who': 'Charse'},\r\n     {'age': 28, 'gender': 'F', 'nation': 'China', 'who': 'Lyn'},\r\n     {'age': 15, 'gender': 'M', 'nation': 'China', 'who': 'Xiaomi'},\r\n     {'age': 19, 'gender': 'F', 'nation': 'Japan', 'who': 'Yuki'},\r\n     {'age': 29, 'gender': 'M', 'nation': 'Korea', 'who': 'Park'},\r\n     {'age': 17, 'gender': 'M', 'nation': 'USA', 'who': 'Smith'},\r\n     {'age': 12, 'gender': 'F', 'nation': 'Korea', 'who': 'Lee'}]\r\n\r\n\r\n\r\n\r\n```python\r\n# adding new columns by record applied function\r\nlst_customer = ls.Listorm(userTable)\r\nlst_customer.add_columns(is_child=lambda row:row.age<15).select('name', 'age', 'is_child')\r\n```\r\n\r\n\r\n\r\n\r\n    [{'age': 18, 'is_child': False, 'name': 'Hong'},\r\n     {'age': 19, 'is_child': False, 'name': 'Charse'},\r\n     {'age': 28, 'is_child': False, 'name': 'Lyn'},\r\n     {'age': 15, 'is_child': False, 'name': 'Xiaomi'},\r\n     {'age': 19, 'is_child': False, 'name': 'Yuki'},\r\n     {'age': 29, 'is_child': False, 'name': 'Park'},\r\n     {'age': 17, 'is_child': False, 'name': 'Smith'},\r\n     {'age': 12, 'is_child': True, 'name': 'Lee'}]\r\n\r\n\r\n\r\n\r\n```python\r\n# get top of records by N\r\nlst_customer = ls.Listorm(userTable)\r\nlst_customer.top('age', n=2) # get oldest 2 people in Listorm\r\n```\r\n\r\n\r\n\r\n\r\n    [{'age': 29, 'gender': 'M', 'location': 'Korea', 'name': 'Park'},\r\n     {'age': 28, 'gender': 'F', 'location': 'China', 'name': 'Lyn'}]\r\n\r\n\r\n\r\n\r\n```python\r\n# get top of records by percentage(if 0<n<1)\r\nlst_customer = ls.Listorm(userTable)\r\nlst_customer.top('age', n=0.5) # get oldest people by top 50% of age\r\n```\r\n\r\n\r\n\r\n\r\n    [{'age': 29, 'gender': 'M', 'location': 'Korea', 'name': 'Park'},\r\n     {'age': 28, 'gender': 'F', 'location': 'China', 'name': 'Lyn'},\r\n     {'age': 19, 'gender': 'M', 'location': 'USA', 'name': 'Charse'},\r\n     {'age': 19, 'gender': 'F', 'location': 'Japan', 'name': 'Yuki'}]\r\n\r\n\r\n\r\n3 . Advanced useage - sorting, grouping, join\r\n\r\n\r\n```python\r\n# 1.orderby location ASC age DESC\r\nlst_customer = ls.Listorm(userTable)\r\nlst_customer.orderby('location', '-age')\r\n```\r\n\r\n\r\n\r\n\r\n    [{'age': 28, 'gender': 'F', 'location': 'China', 'name': 'Lyn'},\r\n     {'age': 15, 'gender': 'M', 'location': 'China', 'name': 'Xiaomi'},\r\n     {'age': 19, 'gender': 'F', 'location': 'Japan', 'name': 'Yuki'},\r\n     {'age': 29, 'gender': 'M', 'location': 'Korea', 'name': 'Park'},\r\n     {'age': 18, 'gender': 'M', 'location': 'Korea', 'name': 'Hong'},\r\n     {'age': 12, 'gender': 'F', 'location': 'Korea', 'name': 'Lee'},\r\n     {'age': 19, 'gender': 'M', 'location': 'USA', 'name': 'Charse'},\r\n     {'age': 17, 'gender': 'M', 'location': 'USA', 'name': 'Smith'}]\r\n\r\n\r\n\r\n\r\n```python\r\n# 2-1groupby location, retrieve gender count and max age\r\nlst_customer = ls.Listorm(userTable)\r\nlst_customer.groupby('location', age=max, gender=len)\r\n```\r\n\r\n\r\n\r\n\r\n    [{'age': 28, 'gender': 2, 'location': 'China'},\r\n     {'age': 19, 'gender': 1, 'location': 'Japan'},\r\n     {'age': 29, 'gender': 3, 'location': 'Korea'},\r\n     {'age': 19, 'gender': 2, 'location': 'USA'}]\r\n\r\n\r\n\r\n\r\n```python\r\n# 2-2.you can rename retrieving columns name which set by grouped result \r\nlst_customer = ls.Listorm(userTable)\r\nlst_customer.groupby('location', \r\n            age=max, gender=len, location=len, \r\n            renames={'age':'Oldest', 'gender': 'GenderCount', 'location': 'locationCount'}\r\n    )\r\n```\r\n\r\n\r\n\r\n\r\n    [{'GenderCount': 2, 'Oldest': 28, 'locationCount': 2},\r\n     {'GenderCount': 1, 'Oldest': 19, 'locationCount': 1},\r\n     {'GenderCount': 3, 'Oldest': 29, 'locationCount': 3},\r\n     {'GenderCount': 2, 'Oldest': 19, 'locationCount': 2}]\r\n\r\n\r\n\r\n\r\n```python\r\n# 2-2.you can include extra column value(value might be last record of group)\r\nlst_customer = ls.Listorm(userTable)\r\nlst_customer.groupby('location',\r\n            age=max, gender=len, location=len, \r\n            renames={'age':'Oldest', 'gender': 'GenderCount', 'location': 'locationCount'},\r\n            extra_columns = ['location']\r\n    )\r\n```\r\n\r\n\r\n\r\n\r\n    [{'GenderCount': 2, 'Oldest': 28, 'location': 'China', 'locationCount': 2},\r\n     {'GenderCount': 1, 'Oldest': 19, 'location': 'Japan', 'locationCount': 1},\r\n     {'GenderCount': 3, 'Oldest': 29, 'location': 'Korea', 'locationCount': 3},\r\n     {'GenderCount': 2, 'Oldest': 19, 'location': 'USA', 'locationCount': 2}]\r\n\r\n\r\n\r\n\r\n```python\r\n# 3.join\r\n#Customers buy records for join Example\r\nbuyTable = [\r\n    {'name': 'Xiaomi', 'product': 'battery', 'amount':7},\r\n    {'name': 'Hong', 'product': 'keyboard', 'amount':1},\r\n    {'name': 'Lyn', 'product': 'cleaner', 'amount':5},\r\n    {'name': 'Hong', 'product': 'monitor', 'amount':1},\r\n    {'name': 'Hong', 'product': 'mouse', 'amount':3},\r\n    {'name': 'Lyn', 'product': 'mouse', 'amount':1},\r\n    {'name': 'Unknown', 'product': 'keyboard', 'amount':1},\r\n    {'name': 'Lee', 'product': 'hardcase', 'amount':2},\r\n    {'name': 'Lee', 'product': 'keycover', 'amount':2},\r\n    {'name': 'Yuki', 'product': 'manual', 'amount':1},\r\n    {'name': 'Xiaomi', 'product': 'cable', 'amount':1},\r\n    {'name': 'anonymous', 'product': 'adopter', 'amount':2},\r\n    {'name': 'Park', 'product': 'battery', 'amount':2},\r\n    {'name': 'Hong', 'product': 'cleaner', 'amount':3},\r\n    {'name': 'Smith', 'product': 'mouse', 'amount':1},\r\n]\r\n```\r\n\r\n\r\n```python\r\nlst_customer = ls.Listorm(userTable)\r\nlst_buyitems = ls.Listorm(buyTable)\r\n```\r\n\r\n\r\n```python\r\n# 3-1 inner join\r\n# Add Extra customer's Info (location) to each buytime\r\nlst_buyitems.join(lst_customer.select('location', 'name'), on='name')\r\n```\r\n\r\n\r\n\r\n\r\n    [{'amount': 1, 'location': 'Japan', 'name': 'Yuki', 'product': 'manual'},\r\n     {'amount': 1, 'location': 'USA', 'name': 'Smith', 'product': 'mouse'},\r\n     {'amount': 2, 'location': 'Korea', 'name': 'Lee', 'product': 'hardcase'},\r\n     {'amount': 2, 'location': 'Korea', 'name': 'Lee', 'product': 'keycover'},\r\n     {'amount': 7, 'location': 'China', 'name': 'Xiaomi', 'product': 'battery'},\r\n     {'amount': 1, 'location': 'China', 'name': 'Xiaomi', 'product': 'cable'},\r\n     {'amount': 1, 'location': 'Korea', 'name': 'Hong', 'product': 'keyboard'},\r\n     {'amount': 1, 'location': 'Korea', 'name': 'Hong', 'product': 'monitor'},\r\n     {'amount': 3, 'location': 'Korea', 'name': 'Hong', 'product': 'mouse'},\r\n     {'amount': 3, 'location': 'Korea', 'name': 'Hong', 'product': 'cleaner'},\r\n     {'amount': 2, 'location': 'Korea', 'name': 'Park', 'product': 'battery'},\r\n     {'amount': 5, 'location': 'China', 'name': 'Lyn', 'product': 'cleaner'},\r\n     {'amount': 1, 'location': 'China', 'name': 'Lyn', 'product': 'mouse'}]\r\n\r\n\r\n\r\n\r\n```python\r\n# 3-2 left join\r\n# if names in buy table are not in customer table, then set to none the customer's info(location is set to none)\r\nlst_buyitems.join(lst_customer.select('location', 'name'), on='name', how='left')\r\n# Unknown and anonymouse location would be set to None\r\n```\r\n\r\n\r\n\r\n\r\n    [{'amount': 1, 'location': 'Korea', 'name': 'Hong', 'product': 'keyboard'},\r\n     {'amount': 1, 'location': 'Korea', 'name': 'Hong', 'product': 'monitor'},\r\n     {'amount': 3, 'location': 'Korea', 'name': 'Hong', 'product': 'mouse'},\r\n     {'amount': 3, 'location': 'Korea', 'name': 'Hong', 'product': 'cleaner'},\r\n     {'amount': 2, 'location': 'Korea', 'name': 'Lee', 'product': 'hardcase'},\r\n     {'amount': 2, 'location': 'Korea', 'name': 'Lee', 'product': 'keycover'},\r\n     {'amount': 5, 'location': 'China', 'name': 'Lyn', 'product': 'cleaner'},\r\n     {'amount': 1, 'location': 'China', 'name': 'Lyn', 'product': 'mouse'},\r\n     {'amount': 2, 'location': 'Korea', 'name': 'Park', 'product': 'battery'},\r\n     {'amount': 1, 'location': 'USA', 'name': 'Smith', 'product': 'mouse'},\r\n     {'amount': 1, 'location': None, 'name': 'Unknown', 'product': 'keyboard'},\r\n     {'amount': 7, 'location': 'China', 'name': 'Xiaomi', 'product': 'battery'},\r\n     {'amount': 1, 'location': 'China', 'name': 'Xiaomi', 'product': 'cable'},\r\n     {'amount': 1, 'location': 'Japan', 'name': 'Yuki', 'product': 'manual'},\r\n     {'amount': 2, 'location': None, 'name': 'anonymous', 'product': 'adopter'}]\r\n\r\n\r\n\r\n\r\n```python\r\n# 3-3 outer join\r\nlst_buyitems.join(lst_customer.select('location', 'name'), on='name', how='outer')\r\n```\r\n\r\n\r\n\r\n\r\n    [{'amount': None, 'location': 'USA', 'name': 'Charse', 'product': None},\r\n     {'amount': 1, 'location': 'Japan', 'name': 'Yuki', 'product': 'manual'},\r\n     {'amount': 1, 'location': 'USA', 'name': 'Smith', 'product': 'mouse'},\r\n     {'amount': 2, 'location': 'Korea', 'name': 'Lee', 'product': 'hardcase'},\r\n     {'amount': 2, 'location': 'Korea', 'name': 'Lee', 'product': 'keycover'},\r\n     {'amount': 7, 'location': 'China', 'name': 'Xiaomi', 'product': 'battery'},\r\n     {'amount': 1, 'location': 'China', 'name': 'Xiaomi', 'product': 'cable'},\r\n     {'amount': 1, 'location': None, 'name': 'Unknown', 'product': 'keyboard'},\r\n     {'amount': 1, 'location': 'Korea', 'name': 'Hong', 'product': 'keyboard'},\r\n     {'amount': 1, 'location': 'Korea', 'name': 'Hong', 'product': 'monitor'},\r\n     {'amount': 3, 'location': 'Korea', 'name': 'Hong', 'product': 'mouse'},\r\n     {'amount': 3, 'location': 'Korea', 'name': 'Hong', 'product': 'cleaner'},\r\n     {'amount': 2, 'location': None, 'name': 'anonymous', 'product': 'adopter'},\r\n     {'amount': 2, 'location': 'Korea', 'name': 'Park', 'product': 'battery'},\r\n     {'amount': 5, 'location': 'China', 'name': 'Lyn', 'product': 'cleaner'},\r\n     {'amount': 1, 'location': 'China', 'name': 'Lyn', 'product': 'mouse'}]\r\n\r\n\r\n\r\n4-1.Utilities - Find Different in two different table - The Changed thing in table\r\n\r\n\r\n```python\r\n# changing to add two record, delete two record and modified a recored where name ==Lyn set age 28 \r\nbefore = [\r\n    {'name': 'Hong', 'gender': 'M', 'age': 18, 'location': 'Korea'},\r\n    {'name': 'Charse', 'gender': 'M', 'age': 19, 'location': 'USA'},\r\n    {'name': 'Lyn', 'gender': 'F', 'age': 29, 'location': 'China'},\r\n]\r\nafter = [\r\n    {'name': 'Lyn', 'gender': 'F', 'age': 28, 'location': 'China'},\r\n    {'name': 'Xiaomi', 'gender': 'M', 'age': 15, 'location': 'China'},\r\n    {'name': 'Park', 'gender': 'M', 'age': 29, 'location': 'Korea'},\r\n]\r\n```\r\n\r\n\r\n```python\r\nchanges = ls.Listorm(before).get_changes(after, pk='name')\r\n#pk: primary key is needed\r\n```\r\n\r\n\r\n```python\r\nchanges\r\n```\r\n\r\n\r\n\r\n\r\n    Changes(added=[Added(pk='Xiaomi', rows={'location': 'China', 'gender': 'M', 'name': 'Xiaomi', 'age': 15}), Added(pk='Park', rows={'location': 'Korea', 'gender': 'M', 'name': 'Park', 'age': 29})], deleted=[Deleted(pk='Hong', rows={'location': 'Korea', 'gender': 'M', 'name': 'Hong', 'age': 18}), Deleted(pk='Charse', rows={'location': 'USA', 'gender': 'M', 'name': 'Charse', 'age': 19})], updated=[Updated(pk='Lyn', before={'location': 'China', 'gender': 'F', 'name': 'Lyn', 'age': 29}, after={'location': 'China', 'gender': 'F', 'name': 'Lyn', 'age': 28}, where=['age'])])\r\n\r\n\r\n\r\n\r\n```python\r\nchanges.added\r\n```\r\n\r\n\r\n\r\n\r\n    [Added(pk='Xiaomi', rows={'location': 'China', 'gender': 'M', 'name': 'Xiaomi', 'age': 15}),\r\n     Added(pk='Park', rows={'location': 'Korea', 'gender': 'M', 'name': 'Park', 'age': 29})]\r\n\r\n\r\n\r\n\r\n```python\r\nchanges.deleted\r\n```\r\n\r\n\r\n\r\n\r\n    [Deleted(pk='Hong', rows={'location': 'Korea', 'gender': 'M', 'name': 'Hong', 'age': 18}),\r\n     Deleted(pk='Charse', rows={'location': 'USA', 'gender': 'M', 'name': 'Charse', 'age': 19})]\r\n\r\n\r\n\r\n\r\n```python\r\nchanges.updated\r\n```\r\n\r\n\r\n\r\n\r\n    [Updated(pk='Lyn', before={'location': 'China', 'gender': 'F', 'name': 'Lyn', 'age': 29}, after={'location': 'China', 'gender': 'F', 'name': 'Lyn', 'age': 28}, where=['age'])]\r\n\r\n\r\n\r\n4-2. Utilities - Read And Write to Excel, CSV\r\n\r\nlst = ls.read_excel(file_name=None, file_contents=None, sheet_index=0, start_row=0, index=None)\r\n\r\nExcel File or byte Content of Excel to Listorm object\r\n\r\nlst = ls.read_csv(filename=None, encoding='utf-8',  fp=None, index=None)\r\n\r\nCSV file or filepointer of CSV to Listorm object\r\n\r\n\r\n```python\r\n# saving date to excel or CSV\r\nlst_customer = ls.Listorm(userTable)\r\nexcel_file_content = lst_customer.to_excel(filename=None) # If filnames is None, returns bytes of filecontents\r\ncsv_file_content = lst_customer.to_csv(filename=None) # If filnames is None, returns bytes of filecontents\r\n```\r\n\r\n\r\n```python\r\n\r\n```\r\n# listorm\r\n# listorm\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "list orm methods and shortcuts for table type of dict-list",
    "version": "1.3.3",
    "project_urls": {
        "Homepage": "https://github.com/zwolf21/listorm"
    },
    "split_keywords": [
        "listorm",
        "list of dict",
        "dict list",
        "records",
        "sql",
        "orm"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0ea29203a6acf2b5ce3dc31a1443fe9d638525b82aab64eea8d3ec8ebf444d15",
                "md5": "2644b210e81fba7f15387ba07dcfc4fd",
                "sha256": "71a7a9d2c9c6d9f68a3f00d34d419c72c5e840a60eed63f0566be8e32ccfc5a0"
            },
            "downloads": -1,
            "filename": "listorm-1.3.3.tar.gz",
            "has_sig": false,
            "md5_digest": "2644b210e81fba7f15387ba07dcfc4fd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 31826,
            "upload_time": "2023-11-12T19:17:09",
            "upload_time_iso_8601": "2023-11-12T19:17:09.917876Z",
            "url": "https://files.pythonhosted.org/packages/0e/a2/9203a6acf2b5ce3dc31a1443fe9d638525b82aab64eea8d3ec8ebf444d15/listorm-1.3.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-12 19:17:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "zwolf21",
    "github_project": "listorm",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "listorm"
}
        
Elapsed time: 0.32504s