# {py:mod}`haniwers.preprocess`

```{py:module} haniwers.preprocess
```

```{autodoc2-docstring} haniwers.preprocess
:allowtitles:
```

## Module Contents

### Functions

````{list-table}
:class: autosummary longtable
:align: left

* - {py:obj}`get_fnames <haniwers.preprocess.get_fnames>`
  - ```{autodoc2-docstring} haniwers.preprocess.get_fnames
    :summary:
    ```
* - {py:obj}`read_data_with_pandas <haniwers.preprocess.read_data_with_pandas>`
  - ```{autodoc2-docstring} haniwers.preprocess.read_data_with_pandas
    :summary:
    ```
* - {py:obj}`read_data_with_polars <haniwers.preprocess.read_data_with_polars>`
  - ```{autodoc2-docstring} haniwers.preprocess.read_data_with_polars
    :summary:
    ```
* - {py:obj}`read_data <haniwers.preprocess.read_data>`
  - ```{autodoc2-docstring} haniwers.preprocess.read_data
    :summary:
    ```
* - {py:obj}`add_time <haniwers.preprocess.add_time>`
  - ```{autodoc2-docstring} haniwers.preprocess.add_time
    :summary:
    ```
* - {py:obj}`add_hit <haniwers.preprocess.add_hit>`
  - ```{autodoc2-docstring} haniwers.preprocess.add_hit
    :summary:
    ```
* - {py:obj}`add_hit_type <haniwers.preprocess.add_hit_type>`
  - ```{autodoc2-docstring} haniwers.preprocess.add_hit_type
    :summary:
    ```
* - {py:obj}`resample_data <haniwers.preprocess.resample_data>`
  - ```{autodoc2-docstring} haniwers.preprocess.resample_data
    :summary:
    ```
* - {py:obj}`resample_data_with_hit_type <haniwers.preprocess.resample_data_with_hit_type>`
  - ```{autodoc2-docstring} haniwers.preprocess.resample_data_with_hit_type
    :summary:
    ```
* - {py:obj}`preprocess_data <haniwers.preprocess.preprocess_data>`
  - ```{autodoc2-docstring} haniwers.preprocess.preprocess_data
    :summary:
    ```
* - {py:obj}`raw2csv <haniwers.preprocess.raw2csv>`
  - ```{autodoc2-docstring} haniwers.preprocess.raw2csv
    :summary:
    ```
* - {py:obj}`run2csv <haniwers.preprocess.run2csv>`
  - ```{autodoc2-docstring} haniwers.preprocess.run2csv
    :summary:
    ```
````

### API

````{py:function} get_fnames(read_from: str, search_pattern: str) -> list[pathlib.Path]
:canonical: haniwers.preprocess.get_fnames

```{autodoc2-docstring} haniwers.preprocess.get_fnames
```
````

````{py:function} read_data_with_pandas(fnames: list[pathlib.Path]) -> pandas.DataFrame
:canonical: haniwers.preprocess.read_data_with_pandas

```{autodoc2-docstring} haniwers.preprocess.read_data_with_pandas
```
````

````{py:function} read_data_with_polars(fnames: list[pathlib.Path]) -> pandas.DataFrame
:canonical: haniwers.preprocess.read_data_with_polars

```{autodoc2-docstring} haniwers.preprocess.read_data_with_polars
```
````

````{py:function} read_data(fnames: list[pathlib.Path]) -> pandas.DataFrame
:canonical: haniwers.preprocess.read_data

```{autodoc2-docstring} haniwers.preprocess.read_data
```
````

````{py:function} add_time(data: pandas.DataFrame, offset: int, timezone: str) -> pandas.DataFrame
:canonical: haniwers.preprocess.add_time

```{autodoc2-docstring} haniwers.preprocess.add_time
```
````

````{py:function} add_hit(data: pandas.DataFrame) -> pandas.DataFrame
:canonical: haniwers.preprocess.add_hit

```{autodoc2-docstring} haniwers.preprocess.add_hit
```
````

````{py:function} add_hit_type(data: pandas.DataFrame) -> pandas.DataFrame
:canonical: haniwers.preprocess.add_hit_type

```{autodoc2-docstring} haniwers.preprocess.add_hit_type
```
````

````{py:function} resample_data(data: pandas.DataFrame, interval: int)
:canonical: haniwers.preprocess.resample_data

```{autodoc2-docstring} haniwers.preprocess.resample_data
```
````

````{py:function} resample_data_with_hit_type(data: pandas.DataFrame, interval: int) -> pandas.DataFrame
:canonical: haniwers.preprocess.resample_data_with_hit_type

```{autodoc2-docstring} haniwers.preprocess.resample_data_with_hit_type
```
````

````{py:function} preprocess_data(data: pandas.DataFrame, interval: int, datetime_offset: int, timezone: str) -> tuple[pandas.DataFrame, pandas.DataFrame]
:canonical: haniwers.preprocess.preprocess_data

```{autodoc2-docstring} haniwers.preprocess.preprocess_data
```
````

````{py:function} raw2csv(fnames: list[pathlib.Path], interval: int, datetime_offset: int, timezone: str) -> tuple[pandas.DataFrame, pandas.DataFrame]
:canonical: haniwers.preprocess.raw2csv

```{autodoc2-docstring} haniwers.preprocess.raw2csv
```
````

````{py:function} run2csv(run: haniwers.config.RunData) -> tuple[pandas.DataFrame, pandas.DataFrame]
:canonical: haniwers.preprocess.run2csv

```{autodoc2-docstring} haniwers.preprocess.run2csv
```
````
