Skip to content

Commit 6ccb221

Browse files
authored
version 1.2.9
version 1.2.9
2 parents 49aec1f + 73c122a commit 6ccb221

26 files changed

Lines changed: 6019 additions & 4914 deletions

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors:
55
given-names: "Otto"
66
orcid: "https://orcid.org/0000-0002-3363-9287"
77
title: "Pyreadstat"
8-
version: 1.2.8
8+
version: 1.2.9
99
doi: 10.5281/zenodo.6612282
1010
date-released: 2018-09-24
1111
url: "https://github.com/Roche/pyreadstat"

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,8 @@ df, meta = pyreadstat.read_sas7bdat('/path/to/a/file.sas7bdat', usecols=["variab
333333
A challenge when reading large files is the time consumed in the operation. In order to alleviate this
334334
pyreadstat provides a function "read\_file\_multiprocessing" to read a file in parallel processes using
335335
the python multiprocessing library. As it reads the whole file in one go you need to have enough RAM for the operation. If
336-
that is not the case look at Reading rows in chunks (next section)
336+
that is not the case look at Reading rows in chunks (next section). Notice however that you can combine reading in parallel
337+
with reading in chunks as described in the next section.
337338

338339
Speed ups in the process will depend on a number of factors such as number of processes available, RAM,
339340
content of the file etc.
@@ -598,11 +599,17 @@ translated as NaN by default and to the correspoding string value if
598599
user_missing is set to True. meta.missing_ranges will show the string
599600
value as well.
600601

601-
If the value in
602+
When writing a pandas dataframe to a sav file, if user defined missing values are not set, NaNs are translated to
603+
empty strings, as there is no other possibility to represent those missing values and user defined missing values
604+
are not set automatically.
605+
606+
When reading a sav into a pandas dataframe, if the value in
602607
a character variable is an empty string (''), it will not be translated to NaN, but will stay as an empty string. This
603-
is because the empty string is a valid character value in SPSS and pyreadstat preserves that property. You can convert
608+
is because the empty string is a valid character value in SPSS and pyreadstat preserves that property.
609+
610+
This behaviour generates an asymetrical situation that has to be managed by the user. You can convert
604611
empty strings to nan very easily with pandas if you think it is appropiate
605-
for your dataset.
612+
for your dataset, or you can use defined missing values as described before.
606613

607614

608615
##### SAS and STATA
@@ -641,7 +648,6 @@ df, meta = pyreadstat.read_dta("/path/to/file.dta", user_missing=True, apply_val
641648

642649
Empty strings are still transtaled as empty strings and not as NaN.
643650

644-
645651
The information about what values are user missing is stored in the meta object, in the variable missing_user_values.
646652
This is a list listing all user defined missing values.
647653

@@ -798,7 +804,7 @@ pyreadstat.write_sav(df, path, variable_format=formats)
798804
```
799805

800806
The appropiate formats to use are beyond the scope of this documentation. Probably you want to read a file
801-
produced in the original application and use meta.original_value_formats to get the formats. Otherwise look
807+
produced in the original application and use meta.original_variable\_types to get the formats. Otherwise look
802808
for the documentation of the original application.
803809

804810
##### SPSS

change_log.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# 1.2.9 (github, pypi and conda 2025.05.17)
2+
* Better error reporting when writing a column with an empty name, solves #276
3+
* added extra_time_formats, solves #283
4+
* changed empty original_variable_type from 'NULL' to None solves #287
5+
* implemented string_ref for large strings when writing DTA solves #268
6+
* updated Readstat sources to commit a000e9c88fee1a003a60b3a86ef5a0ed2b38e56e (March 24th 2025)
7+
18
# 1.2.8 (github, pypi and conda 2024.10.18)
29
* Added Multiple Reponse Data Sets for SAV files #259
310
* Fixed pyreadstat not raising error if folder does not exists when writing #269
123 Bytes
Binary file not shown.

docs/_build/doctrees/index.doctree

9.64 KB
Binary file not shown.

docs/_build/html/.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 3684e396bb8bf7df6bbcdabbae81c680
3+
config: 06953f0822da5e417a66bd7a23c666a3
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

docs/_build/html/_static/documentation_options.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const DOCUMENTATION_OPTIONS = {
2-
VERSION: '1.2.8',
2+
VERSION: '1.2.9',
33
LANGUAGE: 'en',
44
COLLAPSE_INDEX: false,
55
BUILDER: 'html',

docs/_build/html/genindex.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>Index &mdash; pyreadstat 1.2.8 documentation</title>
6+
<title>Index &mdash; pyreadstat 1.2.9 documentation</title>
77
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
88
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
99

@@ -12,7 +12,7 @@
1212
<script src="_static/js/html5shiv.min.js"></script>
1313
<![endif]-->
1414

15-
<script src="_static/documentation_options.js?v=4d6f9085"></script>
15+
<script src="_static/documentation_options.js?v=e917149c"></script>
1616
<script src="_static/doctools.js?v=9a2dae69"></script>
1717
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
1818
<script src="_static/js/theme.js"></script>

0 commit comments

Comments
 (0)