Skip to content

Commit

Permalink
Merge pull request #63 from Roche/dev
Browse files Browse the repository at this point in the history
version 0.3.4
  • Loading branch information
ofajardo authored May 20, 2020
2 parents 7ddb4ef + d3c3df8 commit cf3fbaf
Show file tree
Hide file tree
Showing 23 changed files with 273 additions and 106 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -736,10 +736,12 @@ pull request to ReadStat first.

[Matthew Brett](http://matthew.dynevor.org/) - contributor [python wheels](https://github.com/MacPython/pyreadstat-wheels)

[Jonathon Love](https://jona.thon.love/) - contributor: open files with international characters.
[Jonathon Love](https://jona.thon.love/) - contributor: open files with international characters. Function to open files for writing.

[Clemens Brunner](https://github.com/cbrnr) - integration with pandas.read_spss

[benjello](https://github.com/benjello), [maxwell8888](https://github.com/maxwell8888), [drcjar](https://github.com/drcjar): improvements to documentation

[alchemyst](https://github.com/alchemyst): improvements to docstrings

[bmwiedemann](https://github.com/bmwiedemann), [toddrme2178 ](https://github.com/toddrme2178): improvements to source code
5 changes: 5 additions & 0 deletions change_log.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 0.3.4 (github, pypi and conda 20200520)
* corrected bug when writing and updating files fixes #17
* updated Readstat source to commit 3a53c088cb622f10a02723bbfd9b91d316995aab: better error message when the
file is not a spss file

# 0.3.3 (github, pypi and conda 20200424)
* added capability to set_value_labels to handle subset of dataframes, solves #58

Expand Down
Binary file modified docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/_build/doctrees/index.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/_build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: e5aad791b428aec4c4ae13c2e09050db
config: e5ce19c8c6330853c8402c36ade8ae00
tags: 645f666f9bcd5a90fca523b33c5a78b7
3 changes: 2 additions & 1 deletion docs/_build/html/_static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '0.3.3',
VERSION: '0.3.4',
LANGUAGE: 'None',
COLLAPSE_INDEX: false,
BUILDER: 'html',
FILE_SUFFIX: '.html',
LINK_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt',
NAVIGATION_WITH_KEYS: false
Expand Down
5 changes: 4 additions & 1 deletion docs/_build/html/_static/searchtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ var Search = {
var item = results.pop();
var listItem = $('<li style="display:none"></li>');
var requestUrl = "";
var linkUrl = "";
if (DOCUMENTATION_OPTIONS.BUILDER === 'dirhtml') {
// dirhtml builder
var dirname = item[0] + '/';
Expand All @@ -260,13 +261,15 @@ var Search = {
dirname = '';
}
requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + dirname;
linkUrl = requestUrl;

} else {
// normal html builders
requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX;
linkUrl = item[0] + DOCUMENTATION_OPTIONS.LINK_SUFFIX;
}
listItem.append($('<a/>').attr('href',
requestUrl +
linkUrl +
highlightstring + item[2]).html(item[1]));
if (item[3]) {
listItem.append($('<span> (' + item[3] + ')</span>'));
Expand Down
27 changes: 23 additions & 4 deletions docs/_build/html/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Index &mdash; pyreadstat 0.3.3 documentation</title>
<title>Index &mdash; pyreadstat 0.3.4 documentation</title>



Expand Down Expand Up @@ -145,17 +145,36 @@
<h1 id="index">Index</h1>

<div class="genindex-jumpbox">
<a href="#P"><strong>P</strong></a>
<a href="#M"><strong>M</strong></a>
| <a href="#P"><strong>P</strong></a>
| <a href="#R"><strong>R</strong></a>
| <a href="#S"><strong>S</strong></a>
| <a href="#W"><strong>W</strong></a>

</div>
<h2 id="M">M</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li>
module

<ul>
<li><a href="index.html#module-pyreadstat.pyreadstat">pyreadstat.pyreadstat</a>
</li>
</ul></li>
</ul></td>
</tr></table>

<h2 id="P">P</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#module-pyreadstat.pyreadstat">pyreadstat.pyreadstat (module)</a>
<li>
pyreadstat.pyreadstat

<ul>
<li><a href="index.html#module-pyreadstat.pyreadstat">module</a>
</li>
</ul></li>
</ul></td>
</tr></table>

Expand Down Expand Up @@ -221,7 +240,7 @@ <h2 id="W">W</h2>

<div role="contentinfo">
<p>
&copy; Copyright 2018, Otto Fajardo
&copy; Copyright 2018-2020, Otto Fajardo

</p>
</div>
Expand Down
36 changes: 18 additions & 18 deletions docs/_build/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Welcome to pyreadstat’s documentation! &mdash; pyreadstat 0.3.3 documentation</title>
<title>Welcome to pyreadstat’s documentation! &mdash; pyreadstat 0.3.4 documentation</title>



Expand Down Expand Up @@ -196,7 +196,7 @@ <h1>Metadata Object Description<a class="headerlink" href="#metadata-object-desc
</div>
<div class="section" id="module-pyreadstat.pyreadstat">
<span id="functions-documentation"></span><h1>Functions Documentation<a class="headerlink" href="#module-pyreadstat.pyreadstat" title="Permalink to this headline"></a></h1>
<dl class="function">
<dl class="py function">
<dt id="pyreadstat.pyreadstat.read_dta">
<code class="sig-prename descclassname">pyreadstat.pyreadstat.</code><code class="sig-name descname">read_dta</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyreadstat.pyreadstat.read_dta" title="Permalink to this definition"></a></dt>
<dd><p>Read a STATA dta file</p>
Expand All @@ -209,7 +209,7 @@ <h1>Metadata Object Description<a class="headerlink" href="#metadata-object-desc
<li><p><strong>dates_as_pandas_datetime</strong> (<em>bool</em><em>, </em><em>optional</em>) – by default False. If true dates will be transformed to pandas datetime64 instead of date.</p></li>
<li><p><strong>apply_value_formats</strong> (<em>bool</em><em>, </em><em>optional</em>) – by default False. If true it will change values in the dataframe for they value labels in the metadata,
if any appropiate are found.</p></li>
<li><p><strong>formats_as_category</strong> (<em>bool</em><em>, </em><em>optional</em>) – by default True. Takes effect only if apply_value_formtas is True. If True, variables with values changed
<li><p><strong>formats_as_category</strong> (<em>bool</em><em>, </em><em>optional</em>) – by default True. Takes effect only if apply_value_formats is True. If True, variables with values changed
for their formatted version will be transformed into pandas categories.</p></li>
<li><p><strong>encoding</strong> (<em>str</em><em>, </em><em>optional</em>) – Defaults to None. If set, the system will use the defined encoding instead of guessing it. It has to be an
iconv-compatible name</p></li>
Expand Down Expand Up @@ -237,7 +237,7 @@ <h1>Metadata Object Description<a class="headerlink" href="#metadata-object-desc
</dl>
</dd></dl>

<dl class="function">
<dl class="py function">
<dt id="pyreadstat.pyreadstat.read_file_in_chunks">
<code class="sig-prename descclassname">pyreadstat.pyreadstat.</code><code class="sig-name descname">read_file_in_chunks</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyreadstat.pyreadstat.read_file_in_chunks" title="Permalink to this definition"></a></dt>
<dd><p>Returns a generator that will allow to read a file in chunks.</p>
Expand All @@ -263,7 +263,7 @@ <h1>Metadata Object Description<a class="headerlink" href="#metadata-object-desc
</dl>
</dd></dl>

<dl class="function">
<dl class="py function">
<dt id="pyreadstat.pyreadstat.read_por">
<code class="sig-prename descclassname">pyreadstat.pyreadstat.</code><code class="sig-name descname">read_por</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyreadstat.pyreadstat.read_por" title="Permalink to this definition"></a></dt>
<dd><p>Read a SPSS por file</p>
Expand All @@ -276,7 +276,7 @@ <h1>Metadata Object Description<a class="headerlink" href="#metadata-object-desc
<li><p><strong>dates_as_pandas_datetime</strong> (<em>bool</em><em>, </em><em>optional</em>) – by default False. If true dates will be transformed to pandas datetime64 instead of date.</p></li>
<li><p><strong>apply_value_formats</strong> (<em>bool</em><em>, </em><em>optional</em>) – by default False. If true it will change values in the dataframe for they value labels in the metadata,
if any appropiate are found.</p></li>
<li><p><strong>formats_as_category</strong> (<em>bool</em><em>, </em><em>optional</em>) – by default True. Takes effect only if apply_value_formtas is True. If True, variables with values changed
<li><p><strong>formats_as_category</strong> (<em>bool</em><em>, </em><em>optional</em>) – by default True. Takes effect only if apply_value_formats is True. If True, variables with values changed
for their formatted version will be transformed into pandas categories.</p></li>
<li><p><strong>encoding</strong> (<em>str</em><em>, </em><em>optional</em>) – Defaults to None. If set, the system will use the defined encoding instead of guessing it. It has to be an
iconv-compatible name</p></li>
Expand All @@ -301,7 +301,7 @@ <h1>Metadata Object Description<a class="headerlink" href="#metadata-object-desc
</dl>
</dd></dl>

<dl class="function">
<dl class="py function">
<dt id="pyreadstat.pyreadstat.read_sas7bcat">
<code class="sig-prename descclassname">pyreadstat.pyreadstat.</code><code class="sig-name descname">read_sas7bcat</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyreadstat.pyreadstat.read_sas7bcat" title="Permalink to this definition"></a></dt>
<dd><p>Read a SAS sas7bcat file. The returning dataframe will be empty. The metadata object will contain a dictionary
Expand Down Expand Up @@ -330,7 +330,7 @@ <h1>Metadata Object Description<a class="headerlink" href="#metadata-object-desc
</dl>
</dd></dl>

<dl class="function">
<dl class="py function">
<dt id="pyreadstat.pyreadstat.read_sas7bdat">
<code class="sig-prename descclassname">pyreadstat.pyreadstat.</code><code class="sig-name descname">read_sas7bdat</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyreadstat.pyreadstat.read_sas7bdat" title="Permalink to this definition"></a></dt>
<dd><p>Read a SAS sas7bdat file.
Expand Down Expand Up @@ -376,7 +376,7 @@ <h1>Metadata Object Description<a class="headerlink" href="#metadata-object-desc
</dl>
</dd></dl>

<dl class="function">
<dl class="py function">
<dt id="pyreadstat.pyreadstat.read_sav">
<code class="sig-prename descclassname">pyreadstat.pyreadstat.</code><code class="sig-name descname">read_sav</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyreadstat.pyreadstat.read_sav" title="Permalink to this definition"></a></dt>
<dd><p>Read a SPSS sav or zsav (compressed) files</p>
Expand All @@ -389,7 +389,7 @@ <h1>Metadata Object Description<a class="headerlink" href="#metadata-object-desc
<li><p><strong>dates_as_pandas_datetime</strong> (<em>bool</em><em>, </em><em>optional</em>) – by default False. If true dates will be transformed to pandas datetime64 instead of date.</p></li>
<li><p><strong>apply_value_formats</strong> (<em>bool</em><em>, </em><em>optional</em>) – by default False. If true it will change values in the dataframe for they value labels in the metadata,
if any appropiate are found.</p></li>
<li><p><strong>formats_as_category</strong> (<em>bool</em><em>, </em><em>optional</em>) – by default True. Takes effect only if apply_value_formtas is True. If True, variables with values changed
<li><p><strong>formats_as_category</strong> (<em>bool</em><em>, </em><em>optional</em>) – by default True. Takes effect only if apply_value_formats is True. If True, variables with values changed
for their formatted version will be transformed into pandas categories.</p></li>
<li><p><strong>encoding</strong> (<em>str</em><em>, </em><em>optional</em>) – Defaults to None. If set, the system will use the defined encoding instead of guessing it. It has to be an
iconv-compatible name</p></li>
Expand Down Expand Up @@ -417,7 +417,7 @@ <h1>Metadata Object Description<a class="headerlink" href="#metadata-object-desc
</dl>
</dd></dl>

<dl class="function">
<dl class="py function">
<dt id="pyreadstat.pyreadstat.read_xport">
<code class="sig-prename descclassname">pyreadstat.pyreadstat.</code><code class="sig-name descname">read_xport</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyreadstat.pyreadstat.read_xport" title="Permalink to this definition"></a></dt>
<dd><p>Read a SAS xport file.</p>
Expand Down Expand Up @@ -451,7 +451,7 @@ <h1>Metadata Object Description<a class="headerlink" href="#metadata-object-desc
</dl>
</dd></dl>

<dl class="function">
<dl class="py function">
<dt id="pyreadstat.pyreadstat.set_catalog_to_sas">
<code class="sig-prename descclassname">pyreadstat.pyreadstat.</code><code class="sig-name descname">set_catalog_to_sas</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyreadstat.pyreadstat.set_catalog_to_sas" title="Permalink to this definition"></a></dt>
<dd><p>Changes the values in the dataframe and sas_metadata according to the formats in the catalog.
Expand All @@ -477,7 +477,7 @@ <h1>Metadata Object Description<a class="headerlink" href="#metadata-object-desc
</dl>
</dd></dl>

<dl class="function">
<dl class="py function">
<dt id="pyreadstat.pyreadstat.set_value_labels">
<code class="sig-prename descclassname">pyreadstat.pyreadstat.</code><code class="sig-name descname">set_value_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyreadstat.pyreadstat.set_value_labels" title="Permalink to this definition"></a></dt>
<dd><p>Changes the values in the dataframe according to the value formats in the metadata.
Expand All @@ -501,7 +501,7 @@ <h1>Metadata Object Description<a class="headerlink" href="#metadata-object-desc
</dl>
</dd></dl>

<dl class="function">
<dl class="py function">
<dt id="pyreadstat.pyreadstat.write_dta">
<code class="sig-prename descclassname">pyreadstat.pyreadstat.</code><code class="sig-name descname">write_dta</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyreadstat.pyreadstat.write_dta" title="Permalink to this definition"></a></dt>
<dd><p>Writes a pandas data frame to a STATA dta file</p>
Expand All @@ -525,7 +525,7 @@ <h1>Metadata Object Description<a class="headerlink" href="#metadata-object-desc
</dl>
</dd></dl>

<dl class="function">
<dl class="py function">
<dt id="pyreadstat.pyreadstat.write_por">
<code class="sig-prename descclassname">pyreadstat.pyreadstat.</code><code class="sig-name descname">write_por</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyreadstat.pyreadstat.write_por" title="Permalink to this definition"></a></dt>
<dd><p>Writes a pandas data frame to a SPSS POR file.</p>
Expand All @@ -542,7 +542,7 @@ <h1>Metadata Object Description<a class="headerlink" href="#metadata-object-desc
</dl>
</dd></dl>

<dl class="function">
<dl class="py function">
<dt id="pyreadstat.pyreadstat.write_sav">
<code class="sig-prename descclassname">pyreadstat.pyreadstat.</code><code class="sig-name descname">write_sav</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyreadstat.pyreadstat.write_sav" title="Permalink to this definition"></a></dt>
<dd><p>Writes a pandas data frame to a SPSS sav or zsav file.</p>
Expand Down Expand Up @@ -575,7 +575,7 @@ <h1>Metadata Object Description<a class="headerlink" href="#metadata-object-desc
</dl>
</dd></dl>

<dl class="function">
<dl class="py function">
<dt id="pyreadstat.pyreadstat.write_xport">
<code class="sig-prename descclassname">pyreadstat.pyreadstat.</code><code class="sig-name descname">write_xport</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyreadstat.pyreadstat.write_xport" title="Permalink to this definition"></a></dt>
<dd><p>Writes a pandas data frame to a SAS Xport (xpt) file.
Expand Down Expand Up @@ -617,7 +617,7 @@ <h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Pe

<div role="contentinfo">
<p>
&copy; Copyright 2018, Otto Fajardo
&copy; Copyright 2018-2020, Otto Fajardo

</p>
</div>
Expand Down
Binary file modified docs/_build/html/objects.inv
Binary file not shown.
4 changes: 2 additions & 2 deletions docs/_build/html/py-modindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Python Module Index &mdash; pyreadstat 0.3.3 documentation</title>
<title>Python Module Index &mdash; pyreadstat 0.3.4 documentation</title>



Expand Down Expand Up @@ -176,7 +176,7 @@ <h1>Python Module Index</h1>

<div role="contentinfo">
<p>
&copy; Copyright 2018, Otto Fajardo
&copy; Copyright 2018-2020, Otto Fajardo

</p>
</div>
Expand Down
4 changes: 2 additions & 2 deletions docs/_build/html/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Search &mdash; pyreadstat 0.3.3 documentation</title>
<title>Search &mdash; pyreadstat 0.3.4 documentation</title>



Expand Down Expand Up @@ -165,7 +165,7 @@

<div role="contentinfo">
<p>
&copy; Copyright 2018, Otto Fajardo
&copy; Copyright 2018-2020, Otto Fajardo

</p>
</div>
Expand Down
Loading

0 comments on commit cf3fbaf

Please sign in to comment.