<jupyter_start><jupyter_text>Translation of http://www.win-vector.com/blog/2019/12/what-is-new-for-rquery-december-2019/ into [data_algebra](https://github.com/WinVector/data_algebra).<jupyter_code>import pandas

from data_algebra.data_ops import *
from data_algebra.arrow import *
import data_algebra.SQLite
td = TableDescription(
  "d", 
  ["col1", "col2", "col3"])
ops = td. \
    extend({'sum23': 'col2 + col3'}). \
    select_columns(['sum23'])
ops
ops.columns_used()
db_model = data_algebra.SQLite.SQLiteModel()

print(ops.to_sql(db_model=db_model, pretty=True))
d = pandas.DataFrame({
    'col1': [1], 
    'col2': [2], 
    'col3': [3]
})
d
ops.transform(d)
ops = td. \
    extend({'sum23': 'col2 + col3'}). \
    select_columns(['sum23']). \
    extend({'x': 1}). \
    extend({'x': 2}). \
    extend({'x': 3}). \
    extend({'x': 4}). \
    extend({'x': 5}). \
    select_columns(['x', 'sum23'])

ops
try:
    ops_bad = td. \
      extend({'sum23': 'col2_MISSPELLED + col3'})
except NameError as ne:
    print('caught exception: ' + str(ne))
print(ops.to_sql(db_model=db_model, pretty=True))<jupyter_output>SELECT 5 AS "x",
       "sum23"
FROM
  (SELECT "col2" + "col3" AS "sum23"
   FROM
     (SELECT "col2",
             "col3"
      FROM "d") "table_reference_0") "extend_1"
{'fraction_non_alphanumeric': 0.19813519813519814, 'fraction_numerical': 0.041181041181041184, 'mean_word_length': 3.5034965034965033, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '87523', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 540, 'n_tokens_neox': 506, 'n_words': 94, 'path': 'Examples/Introduction/December_2019_Example.ipynb', 'repo_name': 'WinVector/data_algebra', 'size': '1287'}