semvec/pypi-packages huggingface dataset:
pyphm 0.0.5
Machinery data, made easy
Requires Python: >=3.6

![PyPHM Logo](./notebooks/images/logo.png)

# Machinery data, made easy
![example workflow](https://github.com/tvhahn/PyPHM/actions/workflows/main.yml/badge.svg)

Datasets specific to PHM (prognostics and health management). Use Python to easily download and prepare the data, before feature engineering or model training. 

Current datasets:
- **UC-Berkeley Milling Dataset**: [example notebook](https://github.com/tvhahn/PyPHM/blob/master/notebooks/milling_example.ipynb) ([open in Colab](https://colab.research.google.com/github/tvhahn/PyPHM/blob/master/notebooks/milling_example.ipynb)); [dataset source](https://ti.arc.nasa.gov/tech/dash/groups/pcoe/prognostic-data-repository/#milling)
- **IMS Bearing Dataset**: [dataset source](https://ti.arc.nasa.gov/tech/dash/groups/pcoe/prognostic-data-repository/#bearing)
- **Airbus Helicopter Accelerometer Dataset**: [dataset source](https://www.research-collection.ethz.ch/handle/20.500.11850/415151)
- More coming soon!


## Alpha Notice
PyPHM is in active development. Expect considerable changes in the near future.

Our goals are to create:

* A package that implements **common data preprocessing methods** used by others.
* A package with a **coherent and thoughtful API**.
* Thorough **documentation**, with plenty of **examples**.
* A package that is well **tested**, with the use of **type hints**.
* A package built with **continuous integration and continuous deployment**.


## Installation
Install with pip: `pip install pyphm`

Install from github repository: clone with git `clone https://github.com/tvhahn/PyPHM.git`. Then run `python -m pip install -e .` to install the package on your local machine.

Run tests: `python -m unittest discover -s tests`
csvtables 0.4.0
Convert a CSV formatted input to a readable table in text
Requires Python: >=3.7

# csvtables
Converts a CSV formatted input to a readable table in text. The table is Markdown compatible.

## Installation
Install package using pip:
```
python -m pip install csvtables
```

## Usage
You can use the package directly in the terminal or by importing it in a python script.

### Command line interface
```
csvtables --help
```

Let's assume we have the following text file which is located in `tests/sample_data.csv` (reference: https://en.wikipedia.org/wiki/List_of_galaxies#Closest_galaxies):
```
Rank,Galaxy,Distance
1,Milky Way Galaxy,0
2,Canis Major Dwarf,0.025 Mly
3,Virgo Stellar Stream,0.030 Mly
4,Sagittarius Dwarf Elliptical Galaxy,0.081 Mly
5,Large Magellanic Cloud,0.163 Mly
6,Small Magellanic Cloud,0.197 Mly
```

The table is generated by running:
```
csvtables closest_galaxies.csv
```
and should produce the following output:
```
| Rank | Galaxy                              | Distance  |
|------|-------------------------------------|-----------|
| 1    | Milky Way Galaxy                    | 0         |
| 2    | Canis Major Dwarf                   | 0.025 Mly |
| 3    | Virgo Stellar Stream                | 0.030 Mly |
| 4    | Sagittarius Dwarf Elliptical Galaxy | 0.081 Mly |
| 5    | Large Magellanic Cloud              | 0.163 Mly |
| 6    | Small Magellanic Cloud              | 0.197 Mly |
```

### Running as a module
```
# example.py

from csvtables import csvtables
csv_file = open("tests/sample_data.csv", "r")
table = csvtables.CSVTable(csv_file)
print(table.generate_table())  # display the table to stdout
```