semvec/pypi-packages huggingface dataset:
fuzzyparsers 0.9.5.1
A collection of free-form input parsers (with special focus on dates)
License: MIT

## Introduction and Examples

The fuzzyparsers library provides a small collection of functions to sanitize
free form user input.  For the moment its chief value is the flexible date
parser.  The library strives to be locale smart in parsing dates.

The library has two main parsers.  The first is a prefix parser which compares
a string to a list of strings and returns the unique element of the list which
matches the prefix.  An exception is thrown if the match is not unique.

```python
>>> from fuzzyparsers import fuzzy_match
>>> fuzzy_match(['aab','bba','abc'],'aa')
'aab'
>>> fuzzy_match(['aab','bba','abc'],'a')  # two strings starting with 'a'.
Traceback (most recent call last):
... 
ValueError: ambiguous match for 'a'
```

The second parser parses dates in various formats and returns a datetime.date
object.  Accepted formats include::

    jan 12, 2003
    jan 5
    2004-3-5
    +34 -- 34 days in the future (relative to todays date)
    -4 -- 4 days in the past (relative to todays date)

For instance:

```python
>>> from fuzzyparsers import parse_date
>>> parse_date('nov 30 2012') # my youngest son's birthday
datetime.date(2012, 11, 30)
```

The library allows setting a default date to fill in specified components of a
date (e.g. the year).  By default, a date with-out a year to will give the
current year.

```python
>>> from fuzzyparsers import DateParser
>>> import datetime
>>> DateParser(today=datetime.date(2013, 3, 1)).parse_date('feb 3')
datetime.date(2013, 2, 3)
```

## TODO

We'd like to support the following features:

* Parsing time strings like "10 am" and "3 pm"
* A "[0-9]*.[0-9]*" with the first hunk a month and the second hunk a day
  should return the month/day combination which is nearest.  For example,
  "12-3" would return december 3 of this year or last year.

## Changelog

* 0.9.5 - update revision control to git(hub) and minor regex fix
* 0.9.0 - support Python 3
* 0.8.0 - switch to MIT license because I couldn't figure out why I cared about
  GPL for this package.
* 0.7.3 - locale month-day order issues fixed (thanks to Treeve for getting
  this started.
* 0.7.2 - added doc-tests and "march 2012" date format; doc-test scripts
* 0.7.1 - install fixes
* 0.7 - overhaul of date parsing api to support relative dates (not necessarily
  relative to the current date)
* 0.6.x - initial public release and series of doc/install corrections

## Installation

Fuzzyparsers is written by Joel B. Mohler and distributed under the terms of
the MIT license.

Use the following commands to run the extensive doc-tests::

    py.test fuzzyparsers --doctest-module
    python -m doctest README.txt

To install fuzzyparsers, do the normal python thing (probably as root)::

    python setup.py install

or::

    pip install fuzzyparsers
cricsummary 2.0.2
Perform Analysis, Create summary table and charts from cricsheet data
License: MIT
Requires Python: >=3.5

# cricsummary


cricsummary is built for performing cricket analysis on data provided by cricsheet.org. 
by converting the data in DataFrames or csv files that are better suited for analysis. 

  - Convert json file to csv.
  - Creates DataFrames team-wise. 
  - Vizualise or Perform your own transformations/analysis on the DataFrames.
  - Save the converted file (json to csv)
  - Plot Manhattan and Worm charts



> This is a useful tool to get started with cricket analysis.

### Installation

cricsummary requires python 3.5+ to run.

```
$ pip install cricsummary
```



### How to Use 
Download the data from cricsheet 
Use the txt file in downloaded folder to check name of the match you want to analyse
```
>>> from cricsummary import Duranz


>>> match = Duranz('12345.json')


### BUILT IN METHODS FOR ANAYSIS

# team parameter represent innings, team=1 for data of team batted in 1st inning 
>>> match.scorecard(team=1) 

>>> match.plot_worm() 

>>> match.plot_manhattan(team=2)

>>> match.match_info()

>>> match.extras(team=1)

>>> match.fall_of_wickets(team=2)
```

### Do your Analysis
 - Access separate DataFrames of teams and do your Operations/Analysis
```
# returns dict of dataframe where keys are team name with _<innings> suffix 
match = Duranz('123.json')
>>> df_dict = match.teams_df

### CONVERT JSON TO CSV 
>>> from cricsummary import json_to_csv

# this will save the files of the innings <teamname>_<innings>.csv
>>> json_to_csv('123.json', output_file=True)

```


### Development

Want to contribute? Great!
pull request on https://github.com/KunalDuran/cricsummary

License
----

MIT