Skip to content

Commit

Permalink
Deploying to gh-pages from @ 0e15a75 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
fdosani committed Oct 24, 2024
1 parent 92e8657 commit bef5c63
Show file tree
Hide file tree
Showing 22 changed files with 95 additions and 138 deletions.
2 changes: 1 addition & 1 deletion .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: 8eb14ef0987ca17d9dfbb8af61480095
config: 5d67110e4b7f3308f48f9b0005f1974e
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file modified .doctrees/environment.pickle
Binary file not shown.
Binary file modified .doctrees/index.doctree
Binary file not shown.
Binary file modified .doctrees/spark_usage.doctree
Binary file not shown.
58 changes: 17 additions & 41 deletions _sources/spark_usage.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,40 @@ Spark Usage

.. important::

With version ``v0.12.0`` the original ``SparkCompare`` was replaced with a
Pandas on Spark implementation The original ``SparkCompare``
implementation differs from all the other native implementations. To align the API better,
and keep behaviour consistent we are deprecating the original ``SparkCompare``
With version ``v0.12.0`` the original ``SparkCompare`` was replaced with a
Pandas on Spark implementation The original ``SparkCompare``
implementation differs from all the other native implementations. To align the API better,
and keep behaviour consistent we are deprecating the original ``SparkCompare``
into a new module ``LegacySparkCompare``

Subsequently in ``v0.13.0`` a PySaprk DataFrame class has been introduced (``SparkSQLCompare``)
which accepts ``pyspark.sql.DataFrame`` and should provide better performance. With this version
the Pandas on Spark implementation has been renamed to ``SparkPandasCompare`` and all the spark
which accepts ``pyspark.sql.DataFrame`` and should provide better performance. With this version
the Pandas on Spark implementation has been renamed to ``SparkPandasCompare`` and all the spark
logic is now under the ``spark`` submodule.

If you wish to use the old SparkCompare moving forward you can import it like so:

.. code-block:: python
from datacompy.spark.legacy import LegacySparkCompare
For both ``SparkSQLCompare`` and ``SparkPandasCompare``

- ``on_index`` is not supported.
- Joining is done using ``<=>`` which is the equality test that is safe for null values.
- ``SparkPandasCompare`` compares ``pyspark.pandas.DataFrame``'s
- ``SparkSQLCompare`` compares ``pyspark.sql.DataFrame``'s

Supported Version
------------------
.. important::

Spark will not offically support Pandas 2 until Spark 4: https://issues.apache.org/jira/browse/SPARK-44101
Starting with ``v0.14.1``, ``SparkPandasCompare`` is slated for deprecation. ``SparkSQLCompare``
is the prefered and much more performant. It should be noted that if you continue to use ``SparkPandasCompare``
that ``numpy`` 2+ is not supported due to dependnecy issues.


For ``SparkSQLCompare``

Until then we will not be supporting Pandas 2 for the Pandas on Spark API implementaion.
For Fugue, the Native Pandas (`Compare`), and `SparkSQLCompare` implementations, Pandas 2 is supported.
- ``on_index`` is not supported.
- Joining is done using ``<=>`` which is the equality test that is safe for null values.
- ``SparkSQLCompare`` compares ``pyspark.sql.DataFrame``'s


SparkPandasCompare and SparkSQLCompare Object Setup
---------------------------------------------------
SparkSQLCompare
---------------

There is currently only one supported method for joining your dataframes - by
join column(s).
Expand All @@ -52,7 +47,7 @@ join column(s).
from io import StringIO
import pandas as pd
import pyspark.pandas as ps
from datacompy import SparkPandasCompare, SparkSQLCompare
from datacompy import SparkSQLCompare
from pyspark.sql import SparkSession
spark = SparkSession.builder.getOrCreate()
Expand All @@ -73,25 +68,6 @@ join column(s).
10000001238,1.05,Loose Seal Bluth,111
"""
# SparkPandasCompare
df1 = ps.from_pandas(pd.read_csv(StringIO(data1)))
df2 = ps.from_pandas(pd.read_csv(StringIO(data2)))
compare = SparkPandasCompare(
df1,
df2,
join_columns='acct_id', # You can also specify a list of columns
abs_tol=0, # Optional, defaults to 0
rel_tol=0, # Optional, defaults to 0
df1_name='Original', # Optional, defaults to 'df1'
df2_name='New' # Optional, defaults to 'df2'
)
compare.matches(ignore_extra_columns=False)
# False
# This method prints out a human-readable report summarizing and sampling differences
print(compare.report())
# SparkSQLCompare
df1 = spark.createDataFrame(pd.read_csv(StringIO(data1)))
df2 = spark.createDataFrame(pd.read_csv(StringIO(data2)))
Expand Down
2 changes: 1 addition & 1 deletion _static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const DOCUMENTATION_OPTIONS = {
VERSION: '0.14.0',
VERSION: '0.14.1',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
Expand Down
8 changes: 4 additions & 4 deletions api/datacompy.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link rel="index" title="Index" href="../genindex.html" /><link rel="search" title="Search" href="../search.html" /><link rel="next" title="datacompy.spark package" href="datacompy.spark.html" /><link rel="prev" title="datacompy" href="modules.html" />

<!-- Generated with Sphinx 7.4.7 and Furo 2024.08.06 -->
<title>datacompy package - datacompy 0.14.0 documentation</title>
<title>datacompy package - datacompy 0.14.1 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=354aac6f" />
<link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?v=302659d7" />
Expand Down Expand Up @@ -166,7 +166,7 @@
</label>
</div>
<div class="header-center">
<a href="../index.html"><div class="brand">datacompy 0.14.0 documentation</div></a>
<a href="../index.html"><div class="brand">datacompy 0.14.1 documentation</div></a>
</div>
<div class="header-right">
<div class="theme-toggle-container theme-toggle-header">
Expand All @@ -190,7 +190,7 @@
<div class="sidebar-sticky"><a class="sidebar-brand" href="../index.html">


<span class="sidebar-brand-text">datacompy 0.14.0 documentation</span>
<span class="sidebar-brand-text">datacompy 0.14.1 documentation</span>

</a><form class="sidebar-search-container" method="get" action="../search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
Expand Down Expand Up @@ -2962,7 +2962,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Link to this headi

</aside>
</div>
</div><script src="../_static/documentation_options.js?v=9e420a66"></script>
</div><script src="../_static/documentation_options.js?v=3a3a8e7f"></script>
<script src="../_static/doctools.js?v=9a2dae69"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/scripts/furo.js?v=5fa4622c"></script>
Expand Down
8 changes: 4 additions & 4 deletions api/datacompy.spark.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link rel="index" title="Index" href="../genindex.html" /><link rel="search" title="Search" href="../search.html" /><link rel="prev" title="datacompy package" href="datacompy.html" />

<!-- Generated with Sphinx 7.4.7 and Furo 2024.08.06 -->
<title>datacompy.spark package - datacompy 0.14.0 documentation</title>
<title>datacompy.spark package - datacompy 0.14.1 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=354aac6f" />
<link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?v=302659d7" />
Expand Down Expand Up @@ -166,7 +166,7 @@
</label>
</div>
<div class="header-center">
<a href="../index.html"><div class="brand">datacompy 0.14.0 documentation</div></a>
<a href="../index.html"><div class="brand">datacompy 0.14.1 documentation</div></a>
</div>
<div class="header-right">
<div class="theme-toggle-container theme-toggle-header">
Expand All @@ -190,7 +190,7 @@
<div class="sidebar-sticky"><a class="sidebar-brand" href="../index.html">


<span class="sidebar-brand-text">datacompy 0.14.0 documentation</span>
<span class="sidebar-brand-text">datacompy 0.14.1 documentation</span>

</a><form class="sidebar-search-container" method="get" action="../search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
Expand Down Expand Up @@ -1354,7 +1354,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Link to this headi

</aside>
</div>
</div><script src="../_static/documentation_options.js?v=9e420a66"></script>
</div><script src="../_static/documentation_options.js?v=3a3a8e7f"></script>
<script src="../_static/doctools.js?v=9a2dae69"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/scripts/furo.js?v=5fa4622c"></script>
Expand Down
8 changes: 4 additions & 4 deletions api/modules.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link rel="index" title="Index" href="../genindex.html" /><link rel="search" title="Search" href="../search.html" /><link rel="next" title="datacompy package" href="datacompy.html" /><link rel="prev" title="Developer Instructions" href="../developer_instructions.html" />

<!-- Generated with Sphinx 7.4.7 and Furo 2024.08.06 -->
<title>datacompy - datacompy 0.14.0 documentation</title>
<title>datacompy - datacompy 0.14.1 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=354aac6f" />
<link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?v=302659d7" />
Expand Down Expand Up @@ -166,7 +166,7 @@
</label>
</div>
<div class="header-center">
<a href="../index.html"><div class="brand">datacompy 0.14.0 documentation</div></a>
<a href="../index.html"><div class="brand">datacompy 0.14.1 documentation</div></a>
</div>
<div class="header-right">
<div class="theme-toggle-container theme-toggle-header">
Expand All @@ -190,7 +190,7 @@
<div class="sidebar-sticky"><a class="sidebar-brand" href="../index.html">


<span class="sidebar-brand-text">datacompy 0.14.0 documentation</span>
<span class="sidebar-brand-text">datacompy 0.14.1 documentation</span>

</a><form class="sidebar-search-container" method="get" action="../search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
Expand Down Expand Up @@ -514,7 +514,7 @@ <h1>datacompy<a class="headerlink" href="#datacompy" title="Link to this heading

</aside>
</div>
</div><script src="../_static/documentation_options.js?v=9e420a66"></script>
</div><script src="../_static/documentation_options.js?v=3a3a8e7f"></script>
<script src="../_static/doctools.js?v=9a2dae69"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/scripts/furo.js?v=5fa4622c"></script>
Expand Down
8 changes: 4 additions & 4 deletions benchmark.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Developer Instructions" href="developer_instructions.html" /><link rel="prev" title="Fugue Detail" href="fugue_usage.html" />

<!-- Generated with Sphinx 7.4.7 and Furo 2024.08.06 -->
<title>Benchmarks - datacompy 0.14.0 documentation</title>
<title>Benchmarks - datacompy 0.14.1 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=354aac6f" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?v=302659d7" />
Expand Down Expand Up @@ -166,7 +166,7 @@
</label>
</div>
<div class="header-center">
<a href="index.html"><div class="brand">datacompy 0.14.0 documentation</div></a>
<a href="index.html"><div class="brand">datacompy 0.14.1 documentation</div></a>
</div>
<div class="header-right">
<div class="theme-toggle-container theme-toggle-header">
Expand All @@ -190,7 +190,7 @@
<div class="sidebar-sticky"><a class="sidebar-brand" href="index.html">


<span class="sidebar-brand-text">datacompy 0.14.0 documentation</span>
<span class="sidebar-brand-text">datacompy 0.14.1 documentation</span>

</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
Expand Down Expand Up @@ -465,7 +465,7 @@ <h2>TLDR<a class="headerlink" href="#tldr" title="Link to this heading">¶</a></

</aside>
</div>
</div><script src="_static/documentation_options.js?v=9e420a66"></script>
</div><script src="_static/documentation_options.js?v=3a3a8e7f"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/scripts/furo.js?v=5fa4622c"></script>
Expand Down
8 changes: 4 additions & 4 deletions developer_instructions.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="datacompy" href="api/modules.html" /><link rel="prev" title="Benchmarks" href="benchmark.html" />

<!-- Generated with Sphinx 7.4.7 and Furo 2024.08.06 -->
<title>Developer Instructions - datacompy 0.14.0 documentation</title>
<title>Developer Instructions - datacompy 0.14.1 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=354aac6f" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?v=302659d7" />
Expand Down Expand Up @@ -166,7 +166,7 @@
</label>
</div>
<div class="header-center">
<a href="index.html"><div class="brand">datacompy 0.14.0 documentation</div></a>
<a href="index.html"><div class="brand">datacompy 0.14.1 documentation</div></a>
</div>
<div class="header-right">
<div class="theme-toggle-container theme-toggle-header">
Expand All @@ -190,7 +190,7 @@
<div class="sidebar-sticky"><a class="sidebar-brand" href="index.html">


<span class="sidebar-brand-text">datacompy 0.14.0 documentation</span>
<span class="sidebar-brand-text">datacompy 0.14.1 documentation</span>

</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
Expand Down Expand Up @@ -438,7 +438,7 @@ <h2>Generating distribution archives (PyPI)<a class="headerlink" href="#generati

</aside>
</div>
</div><script src="_static/documentation_options.js?v=9e420a66"></script>
</div><script src="_static/documentation_options.js?v=3a3a8e7f"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/scripts/furo.js?v=5fa4622c"></script>
Expand Down
8 changes: 4 additions & 4 deletions fugue_usage.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Benchmarks" href="benchmark.html" /><link rel="prev" title="Polars Usage" href="polars_usage.html" />

<!-- Generated with Sphinx 7.4.7 and Furo 2024.08.06 -->
<title>Fugue Detail - datacompy 0.14.0 documentation</title>
<title>Fugue Detail - datacompy 0.14.1 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=354aac6f" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?v=302659d7" />
Expand Down Expand Up @@ -166,7 +166,7 @@
</label>
</div>
<div class="header-center">
<a href="index.html"><div class="brand">datacompy 0.14.0 documentation</div></a>
<a href="index.html"><div class="brand">datacompy 0.14.1 documentation</div></a>
</div>
<div class="header-right">
<div class="theme-toggle-container theme-toggle-header">
Expand All @@ -190,7 +190,7 @@
<div class="sidebar-sticky"><a class="sidebar-brand" href="index.html">


<span class="sidebar-brand-text">datacompy 0.14.0 documentation</span>
<span class="sidebar-brand-text">datacompy 0.14.1 documentation</span>

</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
Expand Down Expand Up @@ -433,7 +433,7 @@ <h2>Future releases<a class="headerlink" href="#future-releases" title="Link to

</aside>
</div>
</div><script src="_static/documentation_options.js?v=9e420a66"></script>
</div><script src="_static/documentation_options.js?v=3a3a8e7f"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/scripts/furo.js?v=5fa4622c"></script>
Expand Down
8 changes: 4 additions & 4 deletions genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="#" /><link rel="search" title="Search" href="search.html" />

<!-- Generated with Sphinx 7.4.7 and Furo 2024.08.06 --><title>Index - datacompy 0.14.0 documentation</title>
<!-- Generated with Sphinx 7.4.7 and Furo 2024.08.06 --><title>Index - datacompy 0.14.1 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=354aac6f" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?v=302659d7" />
Expand Down Expand Up @@ -164,7 +164,7 @@
</label>
</div>
<div class="header-center">
<a href="index.html"><div class="brand">datacompy 0.14.0 documentation</div></a>
<a href="index.html"><div class="brand">datacompy 0.14.1 documentation</div></a>
</div>
<div class="header-right">
<div class="theme-toggle-container theme-toggle-header">
Expand All @@ -188,7 +188,7 @@
<div class="sidebar-sticky"><a class="sidebar-brand" href="index.html">


<span class="sidebar-brand-text">datacompy 0.14.0 documentation</span>
<span class="sidebar-brand-text">datacompy 0.14.1 documentation</span>

</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
Expand Down Expand Up @@ -988,7 +988,7 @@ <h2>U</h2>

</aside>
</div>
</div><script src="_static/documentation_options.js?v=9e420a66"></script>
</div><script src="_static/documentation_options.js?v=3a3a8e7f"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/scripts/furo.js?v=5fa4622c"></script>
Expand Down
Loading

0 comments on commit bef5c63

Please sign in to comment.