Skip to main content

Install

pip install xpt2csv-cli

convert xpt files to csv

Let's assume user have one directory that have xpt files


- study_one/
    - bw.xpt
    - dm.xpt
    - lb.xpt
    - mi.xpt
    - om.xpt
    - ts.xpt
    - tx.xpt

make a directory where to save csv files

mkdir directory_to_save_csv/

now convert xpt files to csv files using 'to_csv' command

to_csv study_one/ directory_to_save_csv/

this command will convert all xpt files to csv files and will save in following directory structure

- directory_to_save_csv/
    - study_one/
        - bw.csv
        - dm.csv
        - lb.csv
        - mi.csv
        - om.csv
        - ts.csv
        - tx.csv

Let's say user have few study in a directory all_study/.

- all_study/
    - study_one/
        - bw.xpt
        - dm.xpt
        - lb.xpt
        - mi.xpt
        - om.xpt
        - ts.xpt
        - tx.xpt
    - study_one/
        - bw.xpt
        - dm.xpt
        - lb.xpt
        - mi.xpt
        - om.xpt
        - ts.xpt
        - tx.xpt
to_csv all_study/ directory_to_save_csv/

this will convert and save all xpt files in following directory structure

- directory_to_save_csv/
        - study_one/
            - bw.csv
            - dm.csv
            - lb.csv
            - mi.csv
            - om.csv
            - ts.csv
            - tx.csv
        - study_one/
            - bw.csv
            - dm.csv
            - lb.csv
            - mi.csv
            - om.csv
            - ts.csv
            - tx.csv

NOTE/warning: Metadata in xpt file will lost be when converting to csv.

project in github
pypi link

Release files for xpt2csv-cli 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xpt2csv-cli 0.1.4
File Size Uploaded
xpt2csv_cli-0.1.4.tar.gz 2.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for xpt2csv-cli 0.1.4
File Interpreter ABI Platform
xpt2csv_cli-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 5.2 kB

Release files / xpt2csv_cli-0.1.4.tar.gz

Download URL xpt2csv_cli-0.1.4.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
68459e42d74ebe4da5f3bde52941a8a96488c9be06fce8fb7366d93006e7220c
BLAKE2b-256 checksum
How to use checksums
3a1a55a8a9a0955041139b87a78b918e7d473317e860a3a45ebe0302162ae7c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.13.0

Release files / xpt2csv_cli-0.1.4-py3-none-any.whl

Download URL xpt2csv_cli-0.1.4-py3-none-any.whl
Size 2.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9e07950ded77295e208c3fbf1f8777a8b4675ff3c5b82167446a597dc557e3e9
BLAKE2b-256 checksum
How to use checksums
00ef6635e3dafe86a0eb20a5ff495a0cbaa5c2a10e3bb8fc46a925ff9471f44f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.13.0

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page