
Security News
NIST Under Federal Audit for NVD Processing Backlog and Delays
As vulnerability data bottlenecks grow, the federal government is formally investigating NISTβs handling of the National Vulnerability Database.
A light Python package for converting and processing SAS datasets (.sas7bdat files) into a Polars DataFrame. Designed for high-performance data transformation by leveraging parallel computing.
This package provides a fast and convenient way to read SAS datasets into Polars DataFrames. Converting SAS datasets in Python often requires specific libraries. For large datasets, the conversion process can be a bottleneck. This package addresses this by leveraging concurrent programming to speed up the conversion.
sas_to_polars
allows users to quickly transform their SAS data into the efficient Polars DataFrame structure for further analysis and manipulation in Python.
This package requires Python 3.8 or higher.
The following Python libraries are necessary and will be installed as dependencies:
pyreadstat
: For reading SAS datasets.polars
: For high-performance data manipulation.pyarrow
: For efficient data conversion (required by Polars).You can install sas_to_polars
using pip:
pip install sas-to-polars # Replace with your actual package name on PyPI
After running this command, pip will resolve and install the required dependencies (pyreadstat and polars) along with your sas_to_polars package.
To verify the installation, you can run:
python -c "import sas_to_polars
If no output is returned, the installation was successful.
The primary function in this package is sas_to_polars. Here's how to use it.
from sas_to_polars import sas_to_polars
df = sas_to_polars(filepath="path/to/dataset/data.sas7bdat")
print(df.head())
The sas_to_polars
function accepts the following optional parameters:
For more detailed information about the sas_to_polars function and its parameters, you can use Python's built-in help function:
help(sas_to_polars)
Shape: (3, 3)
βββββββ¬ββββββββββ¬βββββββ
β id β name β age β
β --- β --- β --- β
β f64 β str β f64 β
βββββββͺββββββββββͺβββββββ‘
β 1.0 β Alice β 30.0 β
β 2.0 β Bob β 35.0 β
β 3.0 β Charlie β 40.0 β
βββββββ΄ββββββββββ΄βββββββ
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
Convert SAS datasets (.sas7bdat files) to Polars DataFrames.
We found that sas-to-polars demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Β It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
As vulnerability data bottlenecks grow, the federal government is formally investigating NISTβs handling of the National Vulnerability Database.
Research
Security News
Socketβs Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.
Security News
TypeScript Native Previews offers a 10x faster Go-based compiler, now available on npm for public testing with early editor and language support.