sas7bdat_converter


Namesas7bdat_converter JSON
Version 2.0.1 PyPI version JSON
download
home_pagehttps://github.com/sanders41/sas7bdat-converter
SummaryConvert sas7bdat and xport files into other formats
upload_time2023-11-02 23:30:13
maintainer
docs_urlNone
authorPaul Sanders
requires_python>=3.8.0,<4.0.0
licenseMIT
keywords sas sas7bdat converter xpt xport
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # sas7bdat-converter: Convert sas7bdat files into other formats

[![Tests Status](https://github.com/sanders41/sas7bdat-converter/workflows/Tests/badge.svg?branch=main&event=push)](https://github.com/sanders41/sas7bdat-converter/actions?query=workflow%3ATests+branch%3Amain+event%3Apush)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/sanders41/sas7bdat-converter/main.svg)](https://results.pre-commit.ci/latest/github/sanders41/sas7bdat-converter/main)
[![Coverage](https://codecov.io/github/sanders41/sas7bdat-converter/coverage.svg?branch=main)](https://codecov.io/gh/sanders41/sas7bdat-converter)
[![PyPI version](https://badge.fury.io/py/sas7bdat-converter.svg)](https://badge.fury.io/py/sas7bdat-converter)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sas7bdat-converter?color=5cc141)](https://github.com/sanders41/sas7bdat-converter)

Converts proprietary sas7bdat and/or xport files from SAS into formats such as csv, json, and Excel useable
by other programs. Currently supported conversiaions are csv, Excel (xlsx format), json, Pandas
DataFrame, Parquet and XML.

Conversions can be done on either a single file, an entire directory, or a batch of specified files.

## Install

`pip install sas7bdat-converter`

If you would like to be able to convert to Excel files you will need to install with the extra Excel dependency.

`pip install sas7bdat-converter[excel]`

If you would like to be able to convert to Parquet files you will need to install with the extra parquet dependency.

`pip install sas7bdat-converter[parquet]`

If you would like to use Conda, it includes both the extras required to convert to Excel & Parquet files.

`conda install -c conda-forge sas7bdat-converter`

## Usage

In all cases either sas7bdat or xport files can be converted. Examples below all use the .sas7bdat
extension, xport files with a .xpt extension will also work.

* **batch_to_csv(file_dicts)** - Convert multiple sas7bdat files into csv files at once.
  * file_dicts = A list containing a dictionary for each file to convert. The dictionary is required
  to contain 'sas7bdat_file' containing the path and name for the sas7bdat file, and 'export_file'
  containing the path and name for the csv files. The csv file extension should be .csv. File paths
  can be sent as either strings or Path objects.
  * continue_on_error = If set to true processing of files in a batch will continue if there is a
  file conversion error instead of raising an exception. Default = False

  **Example**

  ```py
  import sas7bdat_converter

  file_dicts = [
    {
      'sas7bdat_file': '/path/to/sas7bdat/files/example_1.sas7bdat',
      'export_file': '/path/to/new/files/example_1.csv',
    },
    {
      'sas7bdat_file': '/path/to/sas7bdat/files/example_2.sas7bdat',
      'export_file': '/path/to/new/files/example_2.csv',
    },
  ]
  sas7bdat_converter.batch_to_csv(file_dicts)
  ```

  **Note:** Example uses Mac/Linux type file paths. For Windows use paths like
  `c:\path\to\sas7bdat\files\example_1.sas7bdat`.

* **batch_to_excel(file_dicts)** - Convert multiple sas7bdat files into Excel files at once.
  * file_dicts = A list containing a dictionary for each file to convert. The dictionary is required
  to contain 'sas7bdat_file' containing the path and name for the sas7bdat file, and 'export_file'
  containing the path and name for the excel files. The Excel file extension should be .xlsx. File
  paths can be sent as either strings or Path objects.
  * continue_on_error = If set to true processing of files in a batch will continue if there is a
  file conversion error instead of raising an exception. Default = False

  **Example**

  ```py
  import sas7bdat_converter

  file_dicts = [
    {
      'sas7bdat_file': '/path/to/sas7bdat/files/example_1.sas7bdat',
      'export_file': '/path/to/new/files/example_1.xlsx',
    },
    {
      'sas7bdat_file': '/path/to/sas7bdat/files/example_2.sas7bdat',
      'export_file': '/path/to/new/files/example_2.xlsx',
    },
  ]
  sas7bdat_converter.batch_to_excel(file_dicts)
  ```

  **Note:** Example uses Mac/Linux type file paths. For Windows use paths like
  `c:\path\to\sas7bdat\files\example_1.sas7bdat`.

* **batch_to_parquet(file_dicts)** - Convert multiple sas7bdat files into Parquet files at once.
  * file_dicts = A list containing a dictionary for each file to convert. The dictionary is required
  to contain 'sas7bdat_file' containing the path and name for the sas7bdat file, and 'export_file'
  containing the path and name for the perquet files. The Perquet file extension should be .perquet. File
  paths can be sent as either strings or Path objects.
  * continue_on_error = If set to true processing of files in a batch will continue if there is a
  file conversion error instead of raising an exception. Default = False

  **Example**

  ```py
  import sas7bdat_converter

  file_dicts = [
    {
      'sas7bdat_file': '/path/to/sas7bdat/files/example_1.sas7bdat',
      'export_file': '/path/to/new/files/example_1.parquet',
    },
    {
      'sas7bdat_file': '/path/to/sas7bdat/files/example_2.sas7bdat',
      'export_file': '/path/to/new/files/example_2.parquet',
    },
  ]
  sas7bdat_converter.batch_to_parquet(file_dicts)
  ```

  **Note:** Example uses Mac/Linux type file paths. For Windows use paths like
  `c:\path\to\sas7bdat\files\example_1.sas7bdat`.

* **batch_to_json(file_dicts)** - Convert multiple sas7bdat files into json files at once.
  * file_dicts = A list containing a dictionary for each file to convert. The dictionary is required
  to contain 'sas7bdat_file' containing the path and name for the sas7bdat file, and 'export_file'
  containing the path and name for the json files. The json file extension should be .json. File
  paths can be sent as either strings or Path objects.
  * continue_on_error = If set to true processing of files in a batch will continue if there is a
  file conversion error instead of raising an exception. Default = False

  **Example**

  ```py
  import sas7bdat_converter

  file_dicts = [
    {
      'sas7bdat_file': '/path/to/sas7bdat/files/example_1.sas7bdat',
      'export_file': '/path/to/new/files/example_1.json',
    },
    {
      'sas7bdat_file': '/path/to/sas7bdat/files/example_2.sas7bdat',
      'export_file': '/path/to/new/files/example_2.json',
    },
  ]
  sas7bdat_converter.batch_to_json(file_dicts)
  ```

  **Note:** Example uses Mac/Linux type file paths. For Windows use paths like
  `c:\path\to\sas7bdat\files\example_1.sas7bdat`.

* **batch_to_xml(file_dicts)** - Convert multiple sas7bdat files into XML files at once.
  * file_dicts = A list containing a dictionary for each file to convert. The dictionary is required
  to contain 'sas7bdat_file' containing the path and name for the sas7bdat file, and 'export_file'
  containing the path and name for the xml files. The XML file extension should be .xml. File paths
  can be sent as either strings or Path objects.
  * continue_on_error = If set to true processing of files in a batch will continue if there is a
  file conversion error instead of raising an exception. Default = False

  **Example**

  ```py
  import sas7bdat_converter

  file_dicts = [
    {
      'sas7bdat_file': '/path/to/sas7bdat/files/example_1.sas7bdat',
      'export_file': '/path/to/new/files/example_1.xml',
    },
    {
      'sas7bdat_file': '/path/to/sas7bdat/files/example_2.sas7bdat',
      'export_file': '/path/to/new/files/example_2.xml',
    },
  ]
  sas7bdat_converter.batch_to_xml(file_dicts)
  ```

  **Note:** Example uses Mac/Linux type file paths. For Windows use paths like
  `c:\path\to\sas7bdat\files\example_1.sas7bdat`.

* **dir_to_csv(dir_path, export_path=None)** - Convert all sas7bdat files in a directory into csv
files at once. File paths can be sent as either strings or Path objects.
  * dir_path = The dictionary that contains the sas7bdat file to convert.
  * export_path = Optional path for the converted files. If no path is supplied the new files will
  be put into the dir_path directory with the sas7bdat files. File paths can be sent as either
  strings or Path objects. Default = None
  * continue_on_error = If set to true processing of files in a batch will continue if there is a
  file conversion error instead of raising an exception. Default = False

  **Example**

  ```py
  import sas7bdat_converter

  # Option 1: put the converted files in the same directory as the sas7bdat files
  sas7bdat_converter.dir_to_csv('/path/to/sas7bdat/files')

  # Option 2: put the converted fiels in a diffferent directory
  sas7bdat_converter.dir_to_csv('/path/to/sas7bdat/files', 'path/for/new/files')
  ```

  **Note:** Example uses Mac/Linux type file paths. For Windows use paths like
  `c:\path\to\sas7bdat\files`.

* **dir_to_excel(dir_path, export_path=None)** - Convert all sas7bdat files in a directory into
Excel files at once. File paths can be sent as either strings or Path objects.
  * dir_path = The dictionary that contains the sas7bdat file to convert.
  * export_path = Optional path for the converted files. If no path is supplied the new files will
  be put into the dir_path directory with the sas7bdat files Default = None
  * continue_on_error = If set to true processing of files in a batch will continue if there is a
  file conversion error instead of raising an exception. Default = False

  **Example**

  ```py
  import sas7bdat_converter

  # Option 1: put the converted files in the same directory as the sas7bdat files
  sas7bdat_converter.dir_to_excel('/path/to/sas7bdat/files')

  # Option 2: put the converted fiels in a diffferent directory
  sas7bdat_converter.dir_to_excel('/path/to/sas7bdat/files', 'path/for/new/files')
  ```

  **Note:** Example uses Mac/Linux type file paths. For Windows use paths like
  `c:\path\to\sas7bdat\files`.

* **dir_to_json(dir_path, export_path=None)** - Convert all sas7bdat files in a directory into json
  files at once. File paths can be sent as either strings or Path objects.
  * dir_path = The dictionary that contains the sas7bdat file to convert.
  * export_path = Optional path for the converted files. If no path is supplied the new files will
  be put into the dir_path directory with the sas7bdat files. Default = None
  * continue_on_error = If set to true processing of files in a batch will continue if there is a
  file conversion error instead of raising an exception. Default = False

  **Example**

  ```py
  import sas7bdat_converter

  # Option 1: put the converted files in the same directory as the sas7bdat files
  sas7bdat_converter.dir_to_json('/path/to/sas7bdat/files')

  # Option 2: put the converted fiels in a diffferent directory
  sas7bdat_converter.dir_to_json('/path/to/sas7bdat/files', 'path/for/new/files')
  ```

  **Note:** Example uses Mac/Linux type file paths. For Windows use paths like
  `c:\path\to\sas7bdat\files`.

* **dir_to_xml(dir_path, export_path=None)** - Convert all sas7bdat files in a directory into XML
  files at once. File paths can be sent as either strings or Path objects.
  * dir_path = The dictionary that contains the sas7bdat file to convert.
  * export_path = Optional path for the converted files. If no path is supplied the new files will
  be put into the dir_path directory with the sas7bdat files. Default = None
  * continue_on_error = If set to true processing of files in a batch will continue if there is a
  file conversion error instead of raising an exception. Default = False

  **Example**

  ```py
  import sas7bdat_converter

  # Option 1: put the converted files in the same directory as the sas7bdat files
  sas7bdat_converter.dir_to_xml('/path/to/sas7bdat/files')

  # Option 2: put the converted fiels in a diffferent directory
  sas7bdat_converter.dir_to_xml('/path/to/sas7bdat/files', 'path/for/new/files')
  ```

  **Note:** Example uses Mac/Linux type file paths. For Windows use paths like
  `c:\path\to\sas7bdat\files`.

* **to_csv(sas7bdat_file, export_file)** - convert a sas7bdat file into a csv file. File path can be
  sent as either a string or Path objects.
  * sas7bdat_file = the path and name for sas7bdat file to convert.
  * export_file = the path and name for the csv file. The csv file extension should be .csv.

  **Example**

  ```py
  import sas7bdat_converter

  sas7bdat_converter.to_csv('/path/to/sas7bdat/file/example.sas7bdat', 'path/to/new/file/example.csv')
  ```

  **Note:** Example uses Mac/Linux type file paths. For Windows use paths like
  `c:\path\to\sas7bdat\files\example.sas7bdat`.

* **to_dataframe(sas7bdat_file)** - Convert a sas7bdat file into a Pandas DataFrame. File path can
  be sent as either a string or Path objects.
  * sas7bdat_file = The path and name for sas7bdat file to convert.

  **Example**

  ```py
  import sas7bdat_converter

  sas7bdat_converter.to_dataframe('/path/to/sas7bdat/file/example.sas7bdat')
  ```

  **Note:** Example uses Mac/Linux type file paths. For Windows use paths like
  `c:\path\to\sas7bdat\files\example_1.sas7bdat`.

* **to_excel(sas7bdat_file, export_file)** - convert a sas7bdat file into a Excel file. File path
  can be sent as either a string or Path objects.
  * sas7bdat_file = the path and name for sas7bdat file to convert.
  * export_file = the path and name for the Excel file. The Excel file extension should be .xlsx.

  **Example**

  ```py
  import sas7bdat_converter

  sas7bdat_converter.to_excel('/path/to/sas7bdat/file/example.sas7bdat',
  'path/to/new/file/example.xlsx')
  ```

  **Note:** Example uses Mac/Linux type file paths. For Windows use paths like
  `c:\path\to\sas7bdat\files\example.sas7bdat`.

* **to_parquet(sas7bdat_file, export_file)** - convert a sas7bdat file into a Parquet file. File path
  can be sent as either a string or Path objects.
  * sas7bdat_file = the path and name for sas7bdat file to convert.
  * export_file = the path and name for the Parquet file. The Parquet file extension should be .parquet.

  **Example**

  ```py
  import sas7bdat_converter

  sas7bdat_converter.to_parquet('/path/to/sas7bdat/file/example.sas7bdat',
  'path/to/new/file/example.parquet')
  ```

  **Note:** Example uses Mac/Linux type file paths. For Windows use paths like
  `c:\path\to\sas7bdat\files\example.sas7bdat`.

* **to_json(sas7bdat_file, export_file)** - convert a sas7bdat file into a json file. File path can
  be sent as either a string or Path objects.
  * sas7bdat_file = the path and name for sas7bdat file to convert.
  * export_file = the path and name for the json file. the json file extension should be .json.

  **Example**

  ```py
  import sas7bdat_converter

  sas7bdat_converter.to_json('/path/to/sas7bdat/file/example.sas7bdat', 'path/to/new/file/example.json')
  ```

  **Note:** Example uses Mac/Linux type file paths. For Windows use paths like
  `c:\path\to\sas7bdat\files\example.sas7bdat`.

* **to_xml(sas7bdat_file, export_file, root_node='root', first_node='item')** - convert a sas7bdat
  file into a XML file. File path can be sent as either a string or Path objects.
  * sas7bdat_file = the path and name for sas7bdat file to convert.
  * export_file = the path and name for the XML file. The XML file extension should be .xlm.
  * root_node = The name to uses for the top level node. If no name is supplied "root" will be used.
  * first_node = The name to use for the first node under root. If no name is supplied "item" will be used.

  **Example**

  ```py
  import sas7bdat_converter

  sas7bdat_converter.to_xml('/path/to/sas7bdat/file/example.sas7bdat', 'path/to/new/file/example.xml')
  ```

  **Note:** Example uses Mac/Linux type file paths. For Windows use paths like
  `c:\path\to\sas7bdat\files\example.sas7bdat`.

## Contributing

If you are interested in contributing to this project please see our [contributing guide](CONTRIBUTING.md)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/sanders41/sas7bdat-converter",
    "name": "sas7bdat_converter",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8.0,<4.0.0",
    "maintainer_email": "",
    "keywords": "sas,sas7bdat,converter,xpt,XPort",
    "author": "Paul Sanders",
    "author_email": "psanders1@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/a6/8e/d54ce30c63cabed7e6460ddddb61cb2498b260c3a2f994a44d09218548c6/sas7bdat_converter-2.0.1.tar.gz",
    "platform": null,
    "description": "# sas7bdat-converter: Convert sas7bdat files into other formats\n\n[![Tests Status](https://github.com/sanders41/sas7bdat-converter/workflows/Tests/badge.svg?branch=main&event=push)](https://github.com/sanders41/sas7bdat-converter/actions?query=workflow%3ATests+branch%3Amain+event%3Apush)\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/sanders41/sas7bdat-converter/main.svg)](https://results.pre-commit.ci/latest/github/sanders41/sas7bdat-converter/main)\n[![Coverage](https://codecov.io/github/sanders41/sas7bdat-converter/coverage.svg?branch=main)](https://codecov.io/gh/sanders41/sas7bdat-converter)\n[![PyPI version](https://badge.fury.io/py/sas7bdat-converter.svg)](https://badge.fury.io/py/sas7bdat-converter)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sas7bdat-converter?color=5cc141)](https://github.com/sanders41/sas7bdat-converter)\n\nConverts proprietary sas7bdat and/or xport files from SAS into formats such as csv, json, and Excel useable\nby other programs. Currently supported conversiaions are csv, Excel (xlsx format), json, Pandas\nDataFrame, Parquet and XML.\n\nConversions can be done on either a single file, an entire directory, or a batch of specified files.\n\n## Install\n\n`pip install sas7bdat-converter`\n\nIf you would like to be able to convert to Excel files you will need to install with the extra Excel dependency.\n\n`pip install sas7bdat-converter[excel]`\n\nIf you would like to be able to convert to Parquet files you will need to install with the extra parquet dependency.\n\n`pip install sas7bdat-converter[parquet]`\n\nIf you would like to use Conda, it includes both the extras required to convert to Excel & Parquet files.\n\n`conda install -c conda-forge sas7bdat-converter`\n\n## Usage\n\nIn all cases either sas7bdat or xport files can be converted. Examples below all use the .sas7bdat\nextension, xport files with a .xpt extension will also work.\n\n* **batch_to_csv(file_dicts)** - Convert multiple sas7bdat files into csv files at once.\n  * file_dicts = A list containing a dictionary for each file to convert. The dictionary is required\n  to contain 'sas7bdat_file' containing the path and name for the sas7bdat file, and 'export_file'\n  containing the path and name for the csv files. The csv file extension should be .csv. File paths\n  can be sent as either strings or Path objects.\n  * continue_on_error = If set to true processing of files in a batch will continue if there is a\n  file conversion error instead of raising an exception. Default = False\n\n  **Example**\n\n  ```py\n  import sas7bdat_converter\n\n  file_dicts = [\n    {\n      'sas7bdat_file': '/path/to/sas7bdat/files/example_1.sas7bdat',\n      'export_file': '/path/to/new/files/example_1.csv',\n    },\n    {\n      'sas7bdat_file': '/path/to/sas7bdat/files/example_2.sas7bdat',\n      'export_file': '/path/to/new/files/example_2.csv',\n    },\n  ]\n  sas7bdat_converter.batch_to_csv(file_dicts)\n  ```\n\n  **Note:** Example uses Mac/Linux type file paths. For Windows use paths like\n  `c:\\path\\to\\sas7bdat\\files\\example_1.sas7bdat`.\n\n* **batch_to_excel(file_dicts)** - Convert multiple sas7bdat files into Excel files at once.\n  * file_dicts = A list containing a dictionary for each file to convert. The dictionary is required\n  to contain 'sas7bdat_file' containing the path and name for the sas7bdat file, and 'export_file'\n  containing the path and name for the excel files. The Excel file extension should be .xlsx. File\n  paths can be sent as either strings or Path objects.\n  * continue_on_error = If set to true processing of files in a batch will continue if there is a\n  file conversion error instead of raising an exception. Default = False\n\n  **Example**\n\n  ```py\n  import sas7bdat_converter\n\n  file_dicts = [\n    {\n      'sas7bdat_file': '/path/to/sas7bdat/files/example_1.sas7bdat',\n      'export_file': '/path/to/new/files/example_1.xlsx',\n    },\n    {\n      'sas7bdat_file': '/path/to/sas7bdat/files/example_2.sas7bdat',\n      'export_file': '/path/to/new/files/example_2.xlsx',\n    },\n  ]\n  sas7bdat_converter.batch_to_excel(file_dicts)\n  ```\n\n  **Note:** Example uses Mac/Linux type file paths. For Windows use paths like\n  `c:\\path\\to\\sas7bdat\\files\\example_1.sas7bdat`.\n\n* **batch_to_parquet(file_dicts)** - Convert multiple sas7bdat files into Parquet files at once.\n  * file_dicts = A list containing a dictionary for each file to convert. The dictionary is required\n  to contain 'sas7bdat_file' containing the path and name for the sas7bdat file, and 'export_file'\n  containing the path and name for the perquet files. The Perquet file extension should be .perquet. File\n  paths can be sent as either strings or Path objects.\n  * continue_on_error = If set to true processing of files in a batch will continue if there is a\n  file conversion error instead of raising an exception. Default = False\n\n  **Example**\n\n  ```py\n  import sas7bdat_converter\n\n  file_dicts = [\n    {\n      'sas7bdat_file': '/path/to/sas7bdat/files/example_1.sas7bdat',\n      'export_file': '/path/to/new/files/example_1.parquet',\n    },\n    {\n      'sas7bdat_file': '/path/to/sas7bdat/files/example_2.sas7bdat',\n      'export_file': '/path/to/new/files/example_2.parquet',\n    },\n  ]\n  sas7bdat_converter.batch_to_parquet(file_dicts)\n  ```\n\n  **Note:** Example uses Mac/Linux type file paths. For Windows use paths like\n  `c:\\path\\to\\sas7bdat\\files\\example_1.sas7bdat`.\n\n* **batch_to_json(file_dicts)** - Convert multiple sas7bdat files into json files at once.\n  * file_dicts = A list containing a dictionary for each file to convert. The dictionary is required\n  to contain 'sas7bdat_file' containing the path and name for the sas7bdat file, and 'export_file'\n  containing the path and name for the json files. The json file extension should be .json. File\n  paths can be sent as either strings or Path objects.\n  * continue_on_error = If set to true processing of files in a batch will continue if there is a\n  file conversion error instead of raising an exception. Default = False\n\n  **Example**\n\n  ```py\n  import sas7bdat_converter\n\n  file_dicts = [\n    {\n      'sas7bdat_file': '/path/to/sas7bdat/files/example_1.sas7bdat',\n      'export_file': '/path/to/new/files/example_1.json',\n    },\n    {\n      'sas7bdat_file': '/path/to/sas7bdat/files/example_2.sas7bdat',\n      'export_file': '/path/to/new/files/example_2.json',\n    },\n  ]\n  sas7bdat_converter.batch_to_json(file_dicts)\n  ```\n\n  **Note:** Example uses Mac/Linux type file paths. For Windows use paths like\n  `c:\\path\\to\\sas7bdat\\files\\example_1.sas7bdat`.\n\n* **batch_to_xml(file_dicts)** - Convert multiple sas7bdat files into XML files at once.\n  * file_dicts = A list containing a dictionary for each file to convert. The dictionary is required\n  to contain 'sas7bdat_file' containing the path and name for the sas7bdat file, and 'export_file'\n  containing the path and name for the xml files. The XML file extension should be .xml. File paths\n  can be sent as either strings or Path objects.\n  * continue_on_error = If set to true processing of files in a batch will continue if there is a\n  file conversion error instead of raising an exception. Default = False\n\n  **Example**\n\n  ```py\n  import sas7bdat_converter\n\n  file_dicts = [\n    {\n      'sas7bdat_file': '/path/to/sas7bdat/files/example_1.sas7bdat',\n      'export_file': '/path/to/new/files/example_1.xml',\n    },\n    {\n      'sas7bdat_file': '/path/to/sas7bdat/files/example_2.sas7bdat',\n      'export_file': '/path/to/new/files/example_2.xml',\n    },\n  ]\n  sas7bdat_converter.batch_to_xml(file_dicts)\n  ```\n\n  **Note:** Example uses Mac/Linux type file paths. For Windows use paths like\n  `c:\\path\\to\\sas7bdat\\files\\example_1.sas7bdat`.\n\n* **dir_to_csv(dir_path, export_path=None)** - Convert all sas7bdat files in a directory into csv\nfiles at once. File paths can be sent as either strings or Path objects.\n  * dir_path = The dictionary that contains the sas7bdat file to convert.\n  * export_path = Optional path for the converted files. If no path is supplied the new files will\n  be put into the dir_path directory with the sas7bdat files. File paths can be sent as either\n  strings or Path objects. Default = None\n  * continue_on_error = If set to true processing of files in a batch will continue if there is a\n  file conversion error instead of raising an exception. Default = False\n\n  **Example**\n\n  ```py\n  import sas7bdat_converter\n\n  # Option 1: put the converted files in the same directory as the sas7bdat files\n  sas7bdat_converter.dir_to_csv('/path/to/sas7bdat/files')\n\n  # Option 2: put the converted fiels in a diffferent directory\n  sas7bdat_converter.dir_to_csv('/path/to/sas7bdat/files', 'path/for/new/files')\n  ```\n\n  **Note:** Example uses Mac/Linux type file paths. For Windows use paths like\n  `c:\\path\\to\\sas7bdat\\files`.\n\n* **dir_to_excel(dir_path, export_path=None)** - Convert all sas7bdat files in a directory into\nExcel files at once. File paths can be sent as either strings or Path objects.\n  * dir_path = The dictionary that contains the sas7bdat file to convert.\n  * export_path = Optional path for the converted files. If no path is supplied the new files will\n  be put into the dir_path directory with the sas7bdat files Default = None\n  * continue_on_error = If set to true processing of files in a batch will continue if there is a\n  file conversion error instead of raising an exception. Default = False\n\n  **Example**\n\n  ```py\n  import sas7bdat_converter\n\n  # Option 1: put the converted files in the same directory as the sas7bdat files\n  sas7bdat_converter.dir_to_excel('/path/to/sas7bdat/files')\n\n  # Option 2: put the converted fiels in a diffferent directory\n  sas7bdat_converter.dir_to_excel('/path/to/sas7bdat/files', 'path/for/new/files')\n  ```\n\n  **Note:** Example uses Mac/Linux type file paths. For Windows use paths like\n  `c:\\path\\to\\sas7bdat\\files`.\n\n* **dir_to_json(dir_path, export_path=None)** - Convert all sas7bdat files in a directory into json\n  files at once. File paths can be sent as either strings or Path objects.\n  * dir_path = The dictionary that contains the sas7bdat file to convert.\n  * export_path = Optional path for the converted files. If no path is supplied the new files will\n  be put into the dir_path directory with the sas7bdat files. Default = None\n  * continue_on_error = If set to true processing of files in a batch will continue if there is a\n  file conversion error instead of raising an exception. Default = False\n\n  **Example**\n\n  ```py\n  import sas7bdat_converter\n\n  # Option 1: put the converted files in the same directory as the sas7bdat files\n  sas7bdat_converter.dir_to_json('/path/to/sas7bdat/files')\n\n  # Option 2: put the converted fiels in a diffferent directory\n  sas7bdat_converter.dir_to_json('/path/to/sas7bdat/files', 'path/for/new/files')\n  ```\n\n  **Note:** Example uses Mac/Linux type file paths. For Windows use paths like\n  `c:\\path\\to\\sas7bdat\\files`.\n\n* **dir_to_xml(dir_path, export_path=None)** - Convert all sas7bdat files in a directory into XML\n  files at once. File paths can be sent as either strings or Path objects.\n  * dir_path = The dictionary that contains the sas7bdat file to convert.\n  * export_path = Optional path for the converted files. If no path is supplied the new files will\n  be put into the dir_path directory with the sas7bdat files. Default = None\n  * continue_on_error = If set to true processing of files in a batch will continue if there is a\n  file conversion error instead of raising an exception. Default = False\n\n  **Example**\n\n  ```py\n  import sas7bdat_converter\n\n  # Option 1: put the converted files in the same directory as the sas7bdat files\n  sas7bdat_converter.dir_to_xml('/path/to/sas7bdat/files')\n\n  # Option 2: put the converted fiels in a diffferent directory\n  sas7bdat_converter.dir_to_xml('/path/to/sas7bdat/files', 'path/for/new/files')\n  ```\n\n  **Note:** Example uses Mac/Linux type file paths. For Windows use paths like\n  `c:\\path\\to\\sas7bdat\\files`.\n\n* **to_csv(sas7bdat_file, export_file)** - convert a sas7bdat file into a csv file. File path can be\n  sent as either a string or Path objects.\n  * sas7bdat_file = the path and name for sas7bdat file to convert.\n  * export_file = the path and name for the csv file. The csv file extension should be .csv.\n\n  **Example**\n\n  ```py\n  import sas7bdat_converter\n\n  sas7bdat_converter.to_csv('/path/to/sas7bdat/file/example.sas7bdat', 'path/to/new/file/example.csv')\n  ```\n\n  **Note:** Example uses Mac/Linux type file paths. For Windows use paths like\n  `c:\\path\\to\\sas7bdat\\files\\example.sas7bdat`.\n\n* **to_dataframe(sas7bdat_file)** - Convert a sas7bdat file into a Pandas DataFrame. File path can\n  be sent as either a string or Path objects.\n  * sas7bdat_file = The path and name for sas7bdat file to convert.\n\n  **Example**\n\n  ```py\n  import sas7bdat_converter\n\n  sas7bdat_converter.to_dataframe('/path/to/sas7bdat/file/example.sas7bdat')\n  ```\n\n  **Note:** Example uses Mac/Linux type file paths. For Windows use paths like\n  `c:\\path\\to\\sas7bdat\\files\\example_1.sas7bdat`.\n\n* **to_excel(sas7bdat_file, export_file)** - convert a sas7bdat file into a Excel file. File path\n  can be sent as either a string or Path objects.\n  * sas7bdat_file = the path and name for sas7bdat file to convert.\n  * export_file = the path and name for the Excel file. The Excel file extension should be .xlsx.\n\n  **Example**\n\n  ```py\n  import sas7bdat_converter\n\n  sas7bdat_converter.to_excel('/path/to/sas7bdat/file/example.sas7bdat',\n  'path/to/new/file/example.xlsx')\n  ```\n\n  **Note:** Example uses Mac/Linux type file paths. For Windows use paths like\n  `c:\\path\\to\\sas7bdat\\files\\example.sas7bdat`.\n\n* **to_parquet(sas7bdat_file, export_file)** - convert a sas7bdat file into a Parquet file. File path\n  can be sent as either a string or Path objects.\n  * sas7bdat_file = the path and name for sas7bdat file to convert.\n  * export_file = the path and name for the Parquet file. The Parquet file extension should be .parquet.\n\n  **Example**\n\n  ```py\n  import sas7bdat_converter\n\n  sas7bdat_converter.to_parquet('/path/to/sas7bdat/file/example.sas7bdat',\n  'path/to/new/file/example.parquet')\n  ```\n\n  **Note:** Example uses Mac/Linux type file paths. For Windows use paths like\n  `c:\\path\\to\\sas7bdat\\files\\example.sas7bdat`.\n\n* **to_json(sas7bdat_file, export_file)** - convert a sas7bdat file into a json file. File path can\n  be sent as either a string or Path objects.\n  * sas7bdat_file = the path and name for sas7bdat file to convert.\n  * export_file = the path and name for the json file. the json file extension should be .json.\n\n  **Example**\n\n  ```py\n  import sas7bdat_converter\n\n  sas7bdat_converter.to_json('/path/to/sas7bdat/file/example.sas7bdat', 'path/to/new/file/example.json')\n  ```\n\n  **Note:** Example uses Mac/Linux type file paths. For Windows use paths like\n  `c:\\path\\to\\sas7bdat\\files\\example.sas7bdat`.\n\n* **to_xml(sas7bdat_file, export_file, root_node='root', first_node='item')** - convert a sas7bdat\n  file into a XML file. File path can be sent as either a string or Path objects.\n  * sas7bdat_file = the path and name for sas7bdat file to convert.\n  * export_file = the path and name for the XML file. The XML file extension should be .xlm.\n  * root_node = The name to uses for the top level node. If no name is supplied \"root\" will be used.\n  * first_node = The name to use for the first node under root. If no name is supplied \"item\" will be used.\n\n  **Example**\n\n  ```py\n  import sas7bdat_converter\n\n  sas7bdat_converter.to_xml('/path/to/sas7bdat/file/example.sas7bdat', 'path/to/new/file/example.xml')\n  ```\n\n  **Note:** Example uses Mac/Linux type file paths. For Windows use paths like\n  `c:\\path\\to\\sas7bdat\\files\\example.sas7bdat`.\n\n## Contributing\n\nIf you are interested in contributing to this project please see our [contributing guide](CONTRIBUTING.md)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Convert sas7bdat and xport files into other formats",
    "version": "2.0.1",
    "project_urls": {
        "Documentation": "https://github.com/sanders41/sas7bdat-converter",
        "Homepage": "https://github.com/sanders41/sas7bdat-converter",
        "Repository": "https://github.com/sanders41/sas7bdat-converter"
    },
    "split_keywords": [
        "sas",
        "sas7bdat",
        "converter",
        "xpt",
        "xport"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "732e1e44b74df4ae406962819a6bfa98bdaf7886dc2d226f734abedc1cc4cfa8",
                "md5": "cd0e183053dc7ffb2df313364e6c66ef",
                "sha256": "c2cf46253c0cf7e16cf4a83e3ad15dfde5ba8aee8f98536273a5e062934aa7ee"
            },
            "downloads": -1,
            "filename": "sas7bdat_converter-2.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cd0e183053dc7ffb2df313364e6c66ef",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8.0,<4.0.0",
            "size": 7867,
            "upload_time": "2023-11-02T23:30:11",
            "upload_time_iso_8601": "2023-11-02T23:30:11.715344Z",
            "url": "https://files.pythonhosted.org/packages/73/2e/1e44b74df4ae406962819a6bfa98bdaf7886dc2d226f734abedc1cc4cfa8/sas7bdat_converter-2.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a68ed54ce30c63cabed7e6460ddddb61cb2498b260c3a2f994a44d09218548c6",
                "md5": "521b6c2c08d630fad8af4d0139cfb048",
                "sha256": "3936327f185ac92e61288ed0ba2f6887cad8a2c406f2f7d53b818e3386c8adfa"
            },
            "downloads": -1,
            "filename": "sas7bdat_converter-2.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "521b6c2c08d630fad8af4d0139cfb048",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8.0,<4.0.0",
            "size": 9058,
            "upload_time": "2023-11-02T23:30:13",
            "upload_time_iso_8601": "2023-11-02T23:30:13.419617Z",
            "url": "https://files.pythonhosted.org/packages/a6/8e/d54ce30c63cabed7e6460ddddb61cb2498b260c3a2f994a44d09218548c6/sas7bdat_converter-2.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-02 23:30:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sanders41",
    "github_project": "sas7bdat-converter",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "sas7bdat_converter"
}
        
Elapsed time: 2.41744s