csvpath 0.0.481__tar.gz → 0.0.482__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. {csvpath-0.0.481 → csvpath-0.0.482}/PKG-INFO +2 -2
  2. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/managers/results_manager.py +5 -8
  3. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/boolean/orf.py +5 -2
  4. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/counting/counter.py +5 -0
  5. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/function_factory.py +5 -5
  6. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/lines/advance.py +3 -2
  7. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/strings/length.py +4 -1
  8. {csvpath-0.0.481/csvpath/matching/functions/math → csvpath-0.0.482/csvpath/matching/functions/types}/intf.py +58 -3
  9. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/validity/line.py +10 -6
  10. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/variables/pushpop.py +1 -1
  11. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/productions/matchable.py +29 -1
  12. csvpath-0.0.482/docs/functions/intf.md +51 -0
  13. csvpath-0.0.482/docs/functions/line.md +74 -0
  14. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/subtract.md +1 -10
  15. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions.md +18 -6
  16. {csvpath-0.0.481 → csvpath-0.0.482}/docs/variables.md +70 -2
  17. {csvpath-0.0.481 → csvpath-0.0.482}/pyproject.toml +1 -1
  18. {csvpath-0.0.481 → csvpath-0.0.482}/LICENSE +0 -0
  19. {csvpath-0.0.481 → csvpath-0.0.482}/README.md +1 -1
  20. {csvpath-0.0.481 → csvpath-0.0.482}/config/config.ini +0 -0
  21. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/__init__.py +0 -0
  22. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/csvpath.py +0 -0
  23. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/csvpaths.py +0 -0
  24. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/managers/__init__.py +0 -0
  25. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/managers/csvpaths_manager.py +0 -0
  26. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/managers/file_manager.py +0 -0
  27. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/managers/result.py +0 -0
  28. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/__init__.py +0 -0
  29. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/__init__.py +0 -0
  30. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/args.py +0 -0
  31. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/boolean/all.py +0 -0
  32. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/boolean/andf.py +0 -0
  33. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/boolean/any.py +0 -0
  34. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/boolean/between.py +0 -0
  35. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/boolean/empty.py +0 -0
  36. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/boolean/exists.py +0 -0
  37. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/boolean/inf.py +0 -0
  38. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/boolean/no.py +0 -0
  39. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/boolean/notf.py +0 -0
  40. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/boolean/yes.py +0 -0
  41. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/counting/count.py +0 -0
  42. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/counting/count_headers.py +0 -0
  43. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/counting/count_lines.py +0 -0
  44. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/counting/count_scans.py +0 -0
  45. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/counting/every.py +0 -0
  46. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/counting/has_matches.py +0 -0
  47. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/counting/increment.py +0 -0
  48. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/counting/tally.py +0 -0
  49. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/counting/total_lines.py +0 -0
  50. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/dates/now.py +0 -0
  51. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/function.py +0 -0
  52. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/function_finder.py +0 -0
  53. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/function_focus.py +0 -0
  54. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/headers/append.py +0 -0
  55. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/headers/collect.py +0 -0
  56. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/headers/empty_stack.py +0 -0
  57. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/headers/end.py +0 -0
  58. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/headers/header_name.py +0 -0
  59. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/headers/header_names_mismatch.py +0 -0
  60. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/headers/headers.py +0 -0
  61. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/headers/mismatch.py +0 -0
  62. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/headers/replace.py +0 -0
  63. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/headers/reset_headers.py +0 -0
  64. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/lines/after_blank.py +0 -0
  65. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/lines/dups.py +0 -0
  66. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/lines/first.py +0 -0
  67. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/lines/first_line.py +0 -0
  68. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/lines/last.py +0 -0
  69. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/lines/stop.py +0 -0
  70. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/math/above.py +0 -0
  71. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/math/add.py +0 -0
  72. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/math/divide.py +0 -0
  73. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/math/equals.py +0 -0
  74. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/math/mod.py +0 -0
  75. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/math/multiply.py +0 -0
  76. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/math/round.py +0 -0
  77. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/math/subtotal.py +0 -0
  78. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/math/subtract.py +0 -0
  79. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/math/sum.py +0 -0
  80. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/misc/importf.py +0 -0
  81. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/misc/random.py +0 -0
  82. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/print/jinjaf.py +0 -0
  83. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/print/print_line.py +0 -0
  84. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/print/print_queue.py +0 -0
  85. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/print/printf.py +0 -0
  86. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/print/table.py +0 -0
  87. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/stats/minf.py +0 -0
  88. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/stats/percent.py +0 -0
  89. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/stats/percent_unique.py +0 -0
  90. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/stats/stdev.py +0 -0
  91. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/strings/concat.py +0 -0
  92. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/strings/lower.py +0 -0
  93. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/strings/metaphone.py +0 -0
  94. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/strings/regex.py +0 -0
  95. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/strings/starts_with.py +0 -0
  96. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/strings/strip.py +0 -0
  97. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/strings/substring.py +0 -0
  98. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/strings/upper.py +0 -0
  99. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/testing/debug.py +0 -0
  100. {csvpath-0.0.481/csvpath/matching/functions/boolean → csvpath-0.0.482/csvpath/matching/functions/types}/boolean.py +0 -0
  101. {csvpath-0.0.481/csvpath/matching/functions/dates → csvpath-0.0.482/csvpath/matching/functions/types}/datef.py +0 -0
  102. {csvpath-0.0.481/csvpath/matching/functions/misc → csvpath-0.0.482/csvpath/matching/functions/types}/nonef.py +0 -0
  103. {csvpath-0.0.481/csvpath/matching/functions/strings → csvpath-0.0.482/csvpath/matching/functions/types}/string.py +0 -0
  104. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/validity/fail.py +0 -0
  105. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/validity/failed.py +0 -0
  106. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/variables/get.py +0 -0
  107. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/variables/put.py +0 -0
  108. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/variables/track.py +0 -0
  109. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/functions/variables/variables.py +0 -0
  110. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/lark_parser.py +0 -0
  111. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/lark_transformer.py +0 -0
  112. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/matcher.py +0 -0
  113. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/productions/__init__.py +0 -0
  114. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/productions/equality.py +0 -0
  115. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/productions/expression.py +0 -0
  116. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/productions/header.py +0 -0
  117. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/productions/qualified.py +0 -0
  118. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/productions/reference.py +0 -0
  119. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/productions/term.py +0 -0
  120. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/productions/variable.py +0 -0
  121. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/util/exceptions.py +0 -0
  122. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/util/expression_encoder.py +0 -0
  123. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/util/expression_utility.py +0 -0
  124. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/util/lark_print_parser.py +0 -0
  125. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/matching/util/print_parser.py +0 -0
  126. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/scanning/__init__.py +0 -0
  127. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/scanning/exceptions.py +0 -0
  128. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/scanning/parser.out +0 -0
  129. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/scanning/parsetab.py +0 -0
  130. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/scanning/scanner.py +0 -0
  131. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/scanning/scanning_lexer.py +0 -0
  132. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/util/cache.py +0 -0
  133. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/util/config.py +0 -0
  134. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/util/config_exception.py +0 -0
  135. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/util/error.py +0 -0
  136. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/util/exceptions.py +0 -0
  137. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/util/last_line_stats.py +0 -0
  138. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/util/line_counter.py +0 -0
  139. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/util/line_monitor.py +0 -0
  140. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/util/log_utility.py +0 -0
  141. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/util/metadata_parser.py +0 -0
  142. {csvpath-0.0.481 → csvpath-0.0.482}/csvpath/util/printer.py +0 -0
  143. {csvpath-0.0.481 → csvpath-0.0.482}/docs/asbool.md +0 -0
  144. {csvpath-0.0.481 → csvpath-0.0.482}/docs/assignment.md +0 -0
  145. {csvpath-0.0.481 → csvpath-0.0.482}/docs/comments.md +0 -0
  146. {csvpath-0.0.481 → csvpath-0.0.482}/docs/config.md +0 -0
  147. {csvpath-0.0.481 → csvpath-0.0.482}/docs/examples.md +0 -0
  148. {csvpath-0.0.481 → csvpath-0.0.482}/docs/files.md +0 -0
  149. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/above.md +0 -0
  150. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/advance.md +0 -0
  151. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/after_blank.md +0 -0
  152. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/all.md +0 -0
  153. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/andor.md +0 -0
  154. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/any.md +0 -0
  155. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/average.md +0 -0
  156. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/between.md +0 -0
  157. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/collect.md +0 -0
  158. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/correlate.md +0 -0
  159. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/count.md +0 -0
  160. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/count_headers.md +0 -0
  161. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/counter.md +0 -0
  162. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/date.md +0 -0
  163. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/empty.md +0 -0
  164. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/empty_stack.md +0 -0
  165. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/end.md +0 -0
  166. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/every.md +0 -0
  167. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/fail.md +0 -0
  168. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/first.md +0 -0
  169. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/get.md +0 -0
  170. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/has_dups.md +0 -0
  171. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/has_matches.md +0 -0
  172. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/header.md +0 -0
  173. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/header_name.md +0 -0
  174. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/header_names_mismatch.md +0 -0
  175. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/implementing_functions.md +0 -0
  176. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/import.md +0 -0
  177. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/in.md +0 -0
  178. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/increment.md +0 -0
  179. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/jinja.md +0 -0
  180. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/last.md +0 -0
  181. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/line_number.md +0 -0
  182. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/max.md +0 -0
  183. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/metaphone.md +0 -0
  184. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/mismatch.md +0 -0
  185. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/no.md +0 -0
  186. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/not.md +0 -0
  187. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/now.md +0 -0
  188. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/percent_unique.md +0 -0
  189. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/pop.md +0 -0
  190. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/print.md +0 -0
  191. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/print_line.md +0 -0
  192. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/print_queue.md +0 -0
  193. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/random.md +0 -0
  194. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/regex.md +0 -0
  195. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/replace.md +0 -0
  196. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/reset_headers.md +0 -0
  197. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/stdev.md +0 -0
  198. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/stop.md +0 -0
  199. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/string_functions.md +0 -0
  200. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/subtotal.md +0 -0
  201. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/sum.md +0 -0
  202. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/tally.md +0 -0
  203. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/total_lines.md +0 -0
  204. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/track.md +0 -0
  205. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/variables.md +0 -0
  206. {csvpath-0.0.481 → csvpath-0.0.482}/docs/functions/variables_and_headers.md +0 -0
  207. {csvpath-0.0.481 → csvpath-0.0.482}/docs/grammar.md +0 -0
  208. {csvpath-0.0.481 → csvpath-0.0.482}/docs/headers.md +0 -0
  209. {csvpath-0.0.481 → csvpath-0.0.482}/docs/images/logo-wordmark-white-on-black-trimmed-padded.png +0 -0
  210. {csvpath-0.0.481 → csvpath-0.0.482}/docs/images/logo-wordmark-white-trimmed.png +0 -0
  211. {csvpath-0.0.481 → csvpath-0.0.482}/docs/paths.md +0 -0
  212. {csvpath-0.0.481 → csvpath-0.0.482}/docs/printing.md +0 -0
  213. {csvpath-0.0.481 → csvpath-0.0.482}/docs/qualifiers.md +0 -0
  214. {csvpath-0.0.481 → csvpath-0.0.482}/docs/references.md +0 -0
  215. {csvpath-0.0.481 → csvpath-0.0.482}/docs/terms.md +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: csvpath
3
- Version: 0.0.481
3
+ Version: 0.0.482
4
4
  Summary: A declarative language for data extraction and validation of CSV files
5
5
  Author: David Kershaw
6
6
  Author-email: dk107dk@hotmail.com
@@ -81,8 +81,8 @@ Read more about CsvPath and see realistic CSV validation examples at <a href='ht
81
81
  - [More Examples](#examples)
82
82
  - [Grammar](#grammar)
83
83
 
84
- # Motivation
85
84
  <a name="motivation"></a>
85
+ # Motivation
86
86
 
87
87
  CSV files are everywhere!
88
88
 
@@ -89,7 +89,6 @@ class ResultsManager(CsvPathsResultsManager): # pylint: disable=C0115
89
89
  def __init__(self, *, csvpaths=None):
90
90
  self.named_results = {}
91
91
  self._csvpaths = None
92
- self._variables = None
93
92
 
94
93
  # use property
95
94
  self.csvpaths = csvpaths
@@ -137,13 +136,11 @@ class ResultsManager(CsvPathsResultsManager): # pylint: disable=C0115
137
136
  return True
138
137
 
139
138
  def get_variables(self, name: str) -> bool:
140
- if self._variables is None:
141
- results = self.get_named_results(name)
142
- vs = {}
143
- for r in results:
144
- vs = {**r.csvpath.variables, **vs}
145
- self._variables = vs
146
- return self._variables
139
+ results = self.get_named_results(name)
140
+ vs = {}
141
+ for r in results:
142
+ vs = {**r.csvpath.variables, **vs}
143
+ return vs
147
144
 
148
145
  def has_lines(self, name: str) -> bool:
149
146
  results = self.get_named_results(name)
@@ -1,4 +1,5 @@
1
1
  # pylint: disable=C0114
2
+ from typing import Any
2
3
  from ..function_focus import MatchDecider
3
4
  from csvpath.matching.productions import Term, Variable, Header, Reference, Equality
4
5
  from ..function import Function
@@ -12,10 +13,12 @@ class Or(MatchDecider):
12
13
  self.args = Args(matchable=self)
13
14
  a = self.args.argset()
14
15
  a.arg(
15
- types=[Term, Variable, Header, Function, Reference, Equality], actuals=[int]
16
+ types=[Term, Variable, Header, Function, Reference, Equality],
17
+ actuals=[None, Any],
16
18
  )
17
19
  a.arg(
18
- types=[Term, Variable, Header, Function, Reference, Equality], actuals=[int]
20
+ types=[Term, Variable, Header, Function, Reference, Equality],
21
+ actuals=[None, Any],
19
22
  )
20
23
  self.args.validate(self.siblings_or_equality())
21
24
  super().check_valid()
@@ -16,6 +16,11 @@ class Counter(ValueProducer):
16
16
  self.args = Args(matchable=self)
17
17
  self.args.argset(1).arg(types=[None, Any], actuals=[int])
18
18
  self.args.validate(self.siblings())
19
+ name = self.first_non_term_qualifier(self.get_id())
20
+ # initializing the counter to 0. if we don't do this and the counter is
21
+ # never hit (e.g. it is behind a ->) a print returns the counter's name
22
+ # which is confusing.
23
+ self.matcher.get_variable(name, set_if_none=0)
19
24
  super().check_valid() # pylint: disable=W0246
20
25
 
21
26
  def _produce_value(self, skip=None) -> None:
@@ -3,11 +3,9 @@ from csvpath.matching.productions.expression import Matchable
3
3
  from .function import Function
4
4
  from .function_finder import FunctionFinder
5
5
  from .dates.now import Now
6
- from .dates.datef import Date
7
6
  from .strings.lower import Lower
8
7
  from .strings.upper import Upper
9
8
  from .strings.substring import Substring
10
- from .strings.string import String
11
9
  from .strings.starts_with import StartsWith
12
10
  from .strings.strip import Strip
13
11
  from .strings.length import Length, MinMaxLength
@@ -35,7 +33,6 @@ from .headers.empty_stack import EmptyStack
35
33
  from .headers.mismatch import Mismatch
36
34
  from .headers.end import End
37
35
  from .math.above import AboveBelow
38
- from .math.intf import Int, Num, Float
39
36
  from .math.add import Add
40
37
  from .math.subtract import Subtract
41
38
  from .math.multiply import Multiply
@@ -47,7 +44,6 @@ from .math.round import Round
47
44
  from .math.mod import Mod
48
45
  from .boolean.notf import Not
49
46
  from .boolean.inf import In
50
- from .boolean.boolean import Boolean
51
47
  from .boolean.orf import Or
52
48
  from .boolean.empty import Empty
53
49
  from .boolean.no import No
@@ -81,12 +77,16 @@ from .variables.get import Get
81
77
  from .variables.put import Put
82
78
  from .variables.track import Track
83
79
  from .misc.random import Random, Shuffle
84
- from .misc.nonef import Nonef, Blank
85
80
  from .misc.importf import Import
86
81
  from .testing.debug import Debug, BriefStackTrace, VoteStack, DoWhenStack, Log
87
82
  from .validity.line import Line
88
83
  from .validity.failed import Failed
89
84
  from .validity.fail import Fail, FailAll
85
+ from .types.nonef import Nonef, Blank
86
+ from .types.boolean import Boolean
87
+ from .types.intf import Int, Num, Float
88
+ from .types.string import String
89
+ from .types.datef import Date
90
90
 
91
91
 
92
92
  class UnknownFunctionException(Exception):
@@ -1,7 +1,8 @@
1
1
  # pylint: disable=C0114
2
2
  from csvpath.matching.util.exceptions import ChildrenException
3
3
  from ..function_focus import SideEffect
4
- from csvpath.matching.productions.term import Term
4
+ from csvpath.matching.productions import Term, Variable
5
+ from csvpath.matching.functions.function import Function
5
6
  from ..args import Args
6
7
 
7
8
 
@@ -11,7 +12,7 @@ class Advance(SideEffect):
11
12
  def check_valid(self) -> None:
12
13
  self.args = Args(matchable=self)
13
14
  a = self.args.argset(1)
14
- a.arg(types=[Term], actuals=[int])
15
+ a.arg(types=[Term, Variable, Function], actuals=[int])
15
16
  self.args.validate(self.siblings())
16
17
  super().check_valid()
17
18
 
@@ -13,7 +13,10 @@ class Length(ValueProducer):
13
13
  def check_valid(self) -> None:
14
14
  self.args = Args(matchable=self)
15
15
  a = self.args.argset(1)
16
- a.arg(types=[Term, Variable, Header, Function, Reference], actuals=[str])
16
+ a.arg(
17
+ types=[Term, Variable, Header, Function, Reference],
18
+ actuals=[None, str, self.args.EMPTY_STRING],
19
+ )
17
20
  self.args.validate(self.siblings())
18
21
  super().check_valid()
19
22
 
@@ -62,9 +62,14 @@ class Num(ValueProducer):
62
62
  self.args = Args(matchable=self)
63
63
  a = self.args.argset(1)
64
64
  a.arg(
65
- types=[Term, Variable, Header, Function],
66
- actuals=[None, int, float, bool],
65
+ types=[Term, Variable, Header, Function], actuals=[None, int, float, bool]
67
66
  )
67
+ a = self.args.argset(5)
68
+ a.arg(types=[Term, Variable, Header, Function], actuals=[None, int, float])
69
+ a.arg(types=[Term, Variable, Header, Function], actuals=[int])
70
+ a.arg(types=[None, Term, Variable, Header, Function], actuals=[int])
71
+ a.arg(types=[None, Term, Variable, Header, Function], actuals=[int])
72
+ a.arg(types=[None, Term, Variable, Header, Function], actuals=[int])
68
73
  self.args.validate(self.siblings())
69
74
  super().check_valid()
70
75
 
@@ -81,4 +86,54 @@ class Num(ValueProducer):
81
86
  self.my_expression.handle_error(e)
82
87
 
83
88
  def _decide_match(self, skip=None) -> None:
84
- self.match = self.default_match()
89
+ """
90
+ (value, max digits before decimal, min digits before decimal, max places, min places)
91
+ max of -1 means we don't care
92
+ min of -1 means 0, or use -1, we don't care
93
+
94
+ """
95
+ val = self._value_one()
96
+ if not ExpressionUtility.is_one_of(val, (int, float)):
97
+ self.match = False
98
+ return
99
+ else:
100
+ self.match = True
101
+
102
+ dmax = self._value_two()
103
+ if dmax is None:
104
+ dmax = -1
105
+ else:
106
+ dmax = ExpressionUtility.to_int(dmax)
107
+
108
+ dmin = self._value_three()
109
+ dmin = ExpressionUtility.to_int(dmin) or 0
110
+
111
+ dplaces_max = self._value_four()
112
+ if dplaces_max is None:
113
+ dplaces_max = -1
114
+ else:
115
+ dplaces_max = ExpressionUtility.to_int(dplaces_max)
116
+
117
+ dplaces_min = self._value_five()
118
+ dplaces_min = ExpressionUtility.to_int(dplaces_min) or 0
119
+
120
+ s = f"{val}"
121
+ d = ""
122
+ si = s.find(".")
123
+ if si > -1:
124
+ d = s[si + 1 :]
125
+ s = s[0:si]
126
+ if dmax > -1 and dmin == dmax:
127
+ self.match = len(s) == dmax
128
+ elif dmax > -1 and dmin > 0:
129
+ self.match = dmin <= len(s) <= dmax
130
+ elif dmax > -1 and dmin == -1:
131
+ self.match = dmax >= len(s)
132
+ elif dmax == -1 and dmin > -1:
133
+ self.match = len(s) >= dmin
134
+ if self.match and dplaces_max > -1 and dplaces_min == dplaces_max:
135
+ self.match = len(d) == dplaces_max
136
+ elif self.match and dplaces_max > -1 and dplaces_min in [0, -1]:
137
+ self.match = 0 <= len(d) <= dplaces_max
138
+ elif self.match and dplaces_max == -1 and dplaces_min > -1:
139
+ self.match = len(d) >= dplaces_min
@@ -7,11 +7,11 @@ from csvpath.matching.util.expression_utility import ExpressionUtility
7
7
  from ..function_focus import MatchDecider
8
8
  from csvpath.matching.functions.function import Function
9
9
  from csvpath.matching.productions.header import Header
10
- from csvpath.matching.functions.strings.string import String
11
- from csvpath.matching.functions.misc.nonef import Nonef, Blank
12
- from csvpath.matching.functions.dates.datef import Date
13
- from csvpath.matching.functions.math.intf import Num, Float, Int
14
- from csvpath.matching.functions.boolean.boolean import Boolean
10
+ from csvpath.matching.functions.types.string import String
11
+ from csvpath.matching.functions.types.nonef import Nonef, Blank
12
+ from csvpath.matching.functions.types.datef import Date
13
+ from csvpath.matching.functions.types.intf import Num, Float, Int
14
+ from csvpath.matching.functions.types.boolean import Boolean
15
15
  from ..args import Args
16
16
 
17
17
 
@@ -69,8 +69,12 @@ class Line(MatchDecider):
69
69
  f"Line {pln}: the {ExpressionUtility._numeric_string(i)} item, {s.name}, does not match"
70
70
  )
71
71
  else:
72
- if isinstance(s, (Blank, Nonef)):
72
+ if isinstance(s, (Blank)):
73
73
  continue
74
+ if isinstance(s, (Nonef)):
75
+ if ExpressionUtility.is_none(self.matcher.line[i]):
76
+ continue
77
+ errors.append(f"Line {pln}: position {i} is not empty")
74
78
  if s.children[0].name != self.matcher.csvpath.headers[i]:
75
79
  errors.append(
76
80
  f"Line {pln}: the {ExpressionUtility._numeric_string(i)} item, {s.children[0].name}, does not name a current header"
@@ -14,7 +14,7 @@ class Push(SideEffect):
14
14
  self.args = Args(matchable=self)
15
15
  a = self.args.argset(2)
16
16
  a.arg(types=[Term, Variable, Header, Function, Reference], actuals=[str])
17
- a.arg(types=[Term, Variable, Header, Function, Reference], actuals=[Any])
17
+ a.arg(types=[Term, Variable, Header, Function, Reference], actuals=[None, Any])
18
18
  self.args.validate(self.siblings())
19
19
  super().check_valid()
20
20
 
@@ -154,10 +154,38 @@ class Matchable(Qualified):
154
154
  if len(self.children) == 0:
155
155
  # validation should have already caught this, if it is a problem
156
156
  return None
157
- if len(self.children) >= 3:
157
+ if len(self.children[0].children) > 2:
158
158
  return self.children[0].children[2]
159
159
  return None
160
160
 
161
+ def _value_four(self, skip=None):
162
+ c = self._child_four()
163
+ if c is None:
164
+ return None
165
+ return c.to_value(skip=skip)
166
+
167
+ def _child_four(self):
168
+ if len(self.children) == 0:
169
+ # validation should have already caught this, if it is a problem
170
+ return None
171
+ if len(self.children[0].children) > 3:
172
+ return self.children[0].children[3]
173
+ return None
174
+
175
+ def _value_five(self, skip=None):
176
+ c = self._child_five()
177
+ if c is None:
178
+ return None
179
+ return c.to_value(skip=skip)
180
+
181
+ def _child_five(self):
182
+ if len(self.children) == 0:
183
+ # validation should have already caught this, if it is a problem
184
+ return None
185
+ if len(self.children[0].children) > 4:
186
+ return self.children[0].children[4]
187
+ return None
188
+
161
189
  def siblings_or_equality(self) -> list:
162
190
  if (
163
191
  len(self.children) == 1
@@ -0,0 +1,51 @@
1
+
2
+ # Int, Float, Num
3
+
4
+ These functions:
5
+ - Identity numbers as types for structural validation
6
+ - Convert values to numbers
7
+
8
+ In CsvPath numbers are often upcast to floats before operations. In some cases it may be desirable to convert floats back to ints or declare the number of places.
9
+
10
+ ## int()
11
+
12
+ Converts its argument to an int, if possible. Beyond the regular way Python converts to int, it will attempt to:
13
+ - Swap a `None` for `0`
14
+ - Strip a string to empty and treat as `0`
15
+
16
+ If the conversion is possible there is a match.
17
+
18
+
19
+ ## float()
20
+
21
+ Converts its argument to a float similar to the way `int()` does, if possible. If the conversion is possible there is a match.
22
+
23
+ ## num()
24
+
25
+ Used for its value, `num()` converts any type to `float`, if possible, with the exception leaving `int`s and `bool`s as they are.
26
+
27
+ In matching num takes up to five arguments:
28
+ - The required value from any match component
29
+ - Optionally:
30
+ - Max number of digits before the decimal
31
+ - Min number of digits before the decimal
32
+ - Max number of digits after the decimal
33
+ - Min number of digits after the decimal
34
+
35
+ In the max/min values a `-1` means we don't care. Effectively a `-1` min is `0`.
36
+
37
+ It is certainly straightforward to handle this validation in a regular expression; however, using `num()` has more type-intentionality and requires less understanding of regular expressions.
38
+
39
+ # Examples
40
+
41
+ ```bash
42
+ $file.csv[*][ line( string(#firstname), num(#age, 3, 1, 0) )]
43
+ ```
44
+
45
+ This declares that the age header value is a whole number < 999. More validation of ages may be needed.
46
+
47
+ ```bash
48
+ $file.csv[*][line( int(#year), num(#rain_in_year, 0, 0, 2 ) )]
49
+ ```
50
+ This csvpath presents the number of inches of rain each year in Luxor, Egypt. .99 is large enough.
51
+
@@ -0,0 +1,74 @@
1
+
2
+ # Line
3
+
4
+ The `line()` function is the core tool for structural validation. It gives you a way to declare the data-shape of a line. `line()` is similar to the `TABLE` declaration in SQL's DDL.
5
+
6
+ `line()` takes any number of functions as arguments. The only allowed functions are data primatives. They include:
7
+ - `string()`
8
+ - `int()`
9
+ - `float()`
10
+ - `num()`
11
+ - `date()`
12
+ - `datetime()`
13
+ - `bool()`
14
+ - `none()`
15
+ - `blank()`
16
+
17
+ All of these type functions can have a `notnone` qualifier. `string()` can optionally take max and min arguments. `none()` requires an empty header. `blank()` indicates an unspecified header.
18
+
19
+ The type functions only take headers as children, with the exception of string, which also optionally takes max and min int arguments. No other functions are allowed.
20
+
21
+ The order of the type functions determines what order of headers is valid. You can think of line as being like a specialized `all()` with a defined order and the ability to accept None values, when so declared.
22
+
23
+ # Examples
24
+
25
+ ```bash
26
+ ~ name: structural validation example with two rules
27
+ match-mode: no-matches
28
+ logic-mode: AND
29
+ validation-mode: print, fail, no-raise
30
+ ~
31
+ $[*][
32
+ line(
33
+ string.notnone(#firstname, 20, 1),
34
+ string (#middlename, 20),
35
+ string.notnone(#lastname, 30, 2),
36
+ int (#age),
37
+ date (#date_of_birth),
38
+ string (#country),
39
+ string (#email, 30)
40
+ )
41
+ or( exists(#age), exists(#date_of_birth) )
42
+ #email -> regex(#email, "@")
43
+ ]
44
+ ```
45
+
46
+ This csvpath defines a line as having seven headers that have string, int, and date typed-values. Additionally, there are two simple rules applied essentially on top of this line definition:
47
+ - A line must have either an age or a date of birth
48
+ - An email must have an `@` sign.
49
+
50
+ Because `match-mode` is set to `no-matches`, if a line doesn't match this description it will be returned as we iterate through the CSV file.
51
+
52
+ ```bash
53
+ ~ name: line definition with gaps ~
54
+ $[*][
55
+ line(
56
+ string.notnone(#firstname, 20, 1),
57
+ none(),
58
+ string.notnone(#lastname, 30, 2),
59
+ int (#age),
60
+ date (#date_of_birth),
61
+ blank(),
62
+ string (#email, 30),
63
+ unspecified (#widget)
64
+ )
65
+ ~ there is a #widget header. we don't know what it is but sometimes
66
+ it has values. the blank() makes a placeholder for a header that
67
+ comes after date. there is always a header there but the name
68
+ isn't consistent ~
69
+ ]
70
+ ```
71
+
72
+ In this version we are saying that middle name is always None, after date_of_birth there is something that we don't have information about, cannot rely on, and should ignore. And that the last column will be consistently present as `#widget`, but is also unknown.
73
+
74
+
@@ -1,5 +1,5 @@
1
1
 
2
- # Add, Subtract, Multiply, Divide, Mod, Int, Round
2
+ # Add, Subtract, Multiply, Divide, Mod, Round
3
3
 
4
4
  These arithmetic functions work mostly the way you would expect.
5
5
 
@@ -27,15 +27,6 @@ Divides any number of numbers. `divide()` will return `nan` when divide by `0` i
27
27
 
28
28
  Returns the modulus of two numbers. `mod()` upcasts to `float` and rounds to the hundredths.
29
29
 
30
- ## int()
31
-
32
- Converts its argument to an int, if possible. If the convert to int fails it will attempt to:
33
- - Swap a `None` for `0`
34
- - Identify the empty string and treat as `0`
35
- - Swap `False` for `0`
36
-
37
- If those attempts don't work it raises `ChildrenException`.
38
-
39
30
  ## round()
40
31
 
41
32
  `round()` takes a numeric value and a number of places and rounds the first by the second. The function will convert a `None` or `bool` to 0.0 or 1.0. The places value must be a positive int.
@@ -14,6 +14,7 @@ Most of the work of matching is done in match component functions. There are ove
14
14
  - [Stats](#stats)
15
15
  - [Strings](#strings)
16
16
  - [Testing](#testing)
17
+ - [Types](#types)
17
18
  - [Validity](#validity)
18
19
  - [Variables](#variables)
19
20
 
@@ -110,8 +111,6 @@ There are lots more simple examples on the individual function pages.
110
111
  ## Dates
111
112
  <table>
112
113
  <tr><th>Function <a name="dates"> </th><th> What it does </th></tr>
113
- <tr><td> <a href='https://github.com/dk107dk/csvpath/blob/main/docs/functions/date.md'>date(value, format)</a></td><td> Returns a date parsed according to a format string. </td></tr>
114
- <tr><td> <a href='https://github.com/dk107dk/csvpath/blob/main/docs/functions/date.md'>datetime(value, format)</a></td><td> Returns a datetime parsed according to a format string. </td></tr>
115
114
  <tr><td> <a href='https://github.com/dk107dk/csvpath/blob/main/docs/functions/now.md'>now(format)</a></td><td> Returns a datetime, optionally formatted, for the current moment. </td></tr>
116
115
  </table>
117
116
 
@@ -172,10 +171,7 @@ There are lots more simple examples on the individual function pages.
172
171
  ## Misc
173
172
  <table>
174
173
  <tr><th>Function <a name="misc"> </th><th> What it does </th></tr>
175
- <tr><td> <a href='https://github.com/dk107dk/csvpath/blob/main/docs/functions/subtract.md'>float(value)</a> </td><td> Returns a number as a float. </td></tr>
176
174
  <tr><td> <a href='https://github.com/dk107dk/csvpath/blob/main/docs/functions/import.md'>import()</a></td><td> Injects another csvpath into the current csvpath. </td></tr>
177
- <tr><td> <a href='https://github.com/dk107dk/csvpath/blob/main/docs/functions/subtract.md'>int(value)</a> </td><td> Returns a number as an int. </td></tr>
178
- <tr><td> <a href='https://github.com/dk107dk/csvpath/blob/main/docs/functions/no.md'>none()</a> </td><td> Returns None. </td></tr>
179
175
  <tr><td><a href='https://github.com/dk107dk/csvpath/blob/main/docs/functions/random.md'>random(starting, ending)</a></td><td> Generates a random int from starting to ending.</td>
180
176
  <tr><td><a href='https://github.com/dk107dk/csvpath/blob/main/docs/functions/random.md'>shuffle(starting, ending)</a></td><td> Generates a random int from starting to ending with no replacement.</td>
181
177
  </table>
@@ -223,7 +219,6 @@ There are lots more simple examples on the individual function pages.
223
219
  <tr><td> <a href='https://github.com/dk107dk/csvpath/blob/main/docs/functions/string_functions.md'>min_length(value)</a> </td><td> Returns the length of the value.</td></tr>
224
220
  <tr><td> <a href='https://github.com/dk107dk/csvpath/blob/main/docs/functions/regex.md'>regex(regex-string, value)</a> </td><td> Matches on a regular expression. </td></tr>
225
221
  <tr><td> <a href='https://github.com/dk107dk/csvpath/blob/main/docs/functions/string_functions.md'>starts_with(value, value)</a> </td><td> Checks if the first value starts with the second. </td></tr>
226
- <tr><td> <a href='https://github.com/dk107dk/csvpath/blob/main/docs/functions/string_functions.md'>string(value, max, min)</a> </td><td> Declares a string, optionally with max and min lengths. </td></tr>
227
222
  <tr><td> <a href='https://github.com/dk107dk/csvpath/blob/main/docs/functions/string_functions.md'>strip(value)</a> </td><td> Trims off whitespace. </td></tr>
228
223
  <tr><td> <a href='https://github.com/dk107dk/csvpath/blob/main/docs/functions/string_functions.md'>substring(value, int)</a> </td><td> Returns the first n chars from the value. </td></tr>
229
224
  <tr><td> <a href='https://github.com/dk107dk/csvpath/blob/main/docs/functions/string_functions.md'>upper(value)</a> </td><td> Makes a value uppercase. </td></tr>
@@ -239,12 +234,29 @@ There are lots more simple examples on the individual function pages.
239
234
  <tr><td> vote_stack() </td><td> Returns a stack with True or False for each match component's match decision. </td></tr>
240
235
  </table>
241
236
 
237
+
238
+ ## Types
239
+ <table>
240
+ <tr><th>Function <a name="types"> </th><th> What it does </th></tr>
241
+ <tr><td>boolean(value)</td><td> A boolean value </td></tr>
242
+ <tr><td> <a href='https://github.com/dk107dk/csvpath/blob/main/docs/functions/date.md'>date(value, format)</a></td><td> Returns a date parsed according to a format string. </td></tr>
243
+ <tr><td> <a href='https://github.com/dk107dk/csvpath/blob/main/docs/functions/date.md'>datetime(value, format)</a></td><td> Returns a datetime parsed according to a format string. </td></tr>
244
+ <tr><td> <a href='https://github.com/dk107dk/csvpath/blob/main/docs/functions/intf.md'>float(value)</a> </td><td> A number as a float. </td></tr>
245
+ <tr><td> <a href='https://github.com/dk107dk/csvpath/blob/main/docs/functions/intf.md'>int(value)</a> </td><td> A number as an int. </td></tr>
246
+ <tr><td> <a href='https://github.com/dk107dk/csvpath/blob/main/docs/functions/no.md'>none()</a> </td><td> Returns None. </td></tr>
247
+ <tr><td> <a href='https://github.com/dk107dk/csvpath/blob/main/docs/functions/intf.md'>num(value, int, int, int, int)</a> </td><td> A number defined as min/max before and after the decimal. </td></tr>
248
+ <tr><td> <a href='https://github.com/dk107dk/csvpath/blob/main/docs/functions/string_functions.md'>string(value, max, min)</a> </td><td> Declares a string, optionally with max and min lengths. </td></tr>
249
+ </table>
250
+
251
+
252
+
242
253
  ## Validity
243
254
  <table>
244
255
  <tr><th>Function <a name="validity"> </th><th> What it does </th></tr>
245
256
  <tr><td> <a href='https://github.com/dk107dk/csvpath/blob/main/docs/functions/fail.md'>fail()</a> </td><td> Indicate that the CSV is invalid. </td></tr>
246
257
  <tr><td> <a href='https://github.com/dk107dk/csvpath/blob/main/docs/functions/fail.md'>failed()</a></td><td> Check if the CSV is invalid. </td></tr>
247
258
  <tr><td> <a href='https://github.com/dk107dk/csvpath/blob/main/docs/functions/fail.md'>fail_and_stop()</a></td><td> Stop the scan and declare the file invalid at the same time. </td></tr>
259
+ <tr><td> <a href='https://github.com/dk107dk/csvpath/blob/main/docs/functions/line.md'>line(function, function, ...)</a></td><td> Declares a typed ordered structure for lines using core data type functions like string(), int(), etc. </td></tr>
248
260
  <tr><td> <a href='https://github.com/dk107dk/csvpath/blob/main/docs/functions/fail.md'>valid()</a></td><td> Check if the CSV is valid or invalid. </td></tr>
249
261
  </table>
250
262