diff --git a/docs/_build/doctrees/environment.pickle b/docs/_build/doctrees/environment.pickle index 279d664ab25dca222496193752999c77496a3f27..d31b9c3d3f27e3455944eda4039422f3c928ec83 100644 Binary files a/docs/_build/doctrees/environment.pickle and b/docs/_build/doctrees/environment.pickle differ diff --git a/docs/_build/doctrees/index.doctree b/docs/_build/doctrees/index.doctree index 60a9b71849740e92ca3758098340ae9186169714..0b5c129c46a1998f61756d69b612d7003b84f392 100644 Binary files a/docs/_build/doctrees/index.doctree and b/docs/_build/doctrees/index.doctree differ diff --git a/docs/_build/doctrees/source/src.doctree b/docs/_build/doctrees/source/src.doctree index da386a8d017868bca738343093cb76a24ee26386..8c7812fb0697746b43fbc33c1272f35d365d1507 100644 Binary files a/docs/_build/doctrees/source/src.doctree and b/docs/_build/doctrees/source/src.doctree differ diff --git a/docs/_build/html/_sources/index.rst.txt b/docs/_build/html/_sources/index.rst.txt index 45c82ec7e20df5370e2829de1a14d63d07f7ff68..f6a64bb1be4094d8759b419a86c5f816e18419e4 100644 --- a/docs/_build/html/_sources/index.rst.txt +++ b/docs/_build/html/_sources/index.rst.txt @@ -1,4 +1,4 @@ -.. asdsd documentation master file, created by +.. documentation master file, created by sphinx-quickstart on Fri Jul 14 02:13:49 2023. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. @@ -6,11 +6,13 @@ Welcome to this project's documentation! ======================================== -.. include:: ../README.md +This site contains the documentation of the functions written in this project. + +For a more detailed introduction to this project, please see the `README.md` in the top-level directory of this project. .. toctree:: :maxdepth: 2 - :caption: Contents: + :caption: Documentation contents: genindex search diff --git a/docs/_build/html/genindex.html b/docs/_build/html/genindex.html index e7d6fe2de79ea2579ffb950bfb2b9c1f864727a4..94202f39b34ba91e4a164d888196397ffef8b360 100644 --- a/docs/_build/html/genindex.html +++ b/docs/_build/html/genindex.html @@ -34,6 +34,7 @@ <div class="genindex-jumpbox"> <a href="#C"><strong>C</strong></a> | <a href="#D"><strong>D</strong></a> + | <a href="#F"><strong>F</strong></a> | <a href="#G"><strong>G</strong></a> | <a href="#M"><strong>M</strong></a> | <a href="#P"><strong>P</strong></a> @@ -62,20 +63,36 @@ </ul></td> </tr></table> +<h2 id="F">F</h2> +<table style="width: 100%" class="indextable genindextable"><tr> + <td style="width: 33%; vertical-align: top;"><ul> + <li><a href="source/src.html#src.Dataset.Dataset.filtered_rows">filtered_rows() (src.Dataset.Dataset method)</a> +</li> + </ul></td> +</tr></table> + <h2 id="G">G</h2> <table style="width: 100%" class="indextable genindextable"><tr> <td style="width: 33%; vertical-align: top;"><ul> <li><a href="source/src.html#src.Dataset.Dataset.get_category_counts">get_category_counts() (src.Dataset.Dataset method)</a> </li> - <li><a href="source/src.html#src.Dataset.Dataset.get_combined_anxiety_score">get_combined_anxiety_score() (src.Dataset.Dataset method)</a> + <li><a href="source/src.html#src.Dataset.Dataset.get_column_count">get_column_count() (src.Dataset.Dataset method)</a> </li> - <li><a href="source/src.html#src.Dataset.Dataset.get_dataframe">get_dataframe() (src.Dataset.Dataset method)</a> + <li><a href="source/src.html#src.Dataset.Dataset.get_column_mean">get_column_mean() (src.Dataset.Dataset method)</a> +</li> + <li><a href="source/src.html#src.Dataset.Dataset.get_columns">get_columns() (src.Dataset.Dataset method)</a> +</li> + <li><a href="source/src.html#src.Dataset.Dataset.get_combined_anxiety_score">get_combined_anxiety_score() (src.Dataset.Dataset method)</a> </li> </ul></td> <td style="width: 33%; vertical-align: top;"><ul> + <li><a href="source/src.html#src.Dataset.Dataset.get_dataframe">get_dataframe() (src.Dataset.Dataset method)</a> +</li> <li><a href="source/src.html#src.Dataset.Dataset.get_is_competitive_col">get_is_competitive_col() (src.Dataset.Dataset method)</a> </li> <li><a href="source/src.html#src.Dataset.Dataset.get_is_narcissist_col">get_is_narcissist_col() (src.Dataset.Dataset method)</a> +</li> + <li><a href="source/src.html#src.Dataset.Dataset.get_row_count">get_row_count() (src.Dataset.Dataset method)</a> </li> <li><a href="source/src.html#src.Dataset.Dataset.get_sorted_column">get_sorted_column() (src.Dataset.Dataset method)</a> </li> @@ -207,11 +224,21 @@ </li> <li><a href="source/src.html#src.test_plotter.test_distribution_plot">test_distribution_plot() (in module src.test_plotter)</a> </li> - <li><a href="source/src.html#src.test_dataset.test_get_dataframe">test_get_dataframe() (in module src.test_dataset)</a> + <li><a href="source/src.html#src.test_dataset.test_filtered_rows">test_filtered_rows() (in module src.test_dataset)</a> +</li> + <li><a href="source/src.html#src.test_dataset.test_get_column_count">test_get_column_count() (in module src.test_dataset)</a> +</li> + <li><a href="source/src.html#src.test_dataset.test_get_column_mean">test_get_column_mean() (in module src.test_dataset)</a> +</li> + <li><a href="source/src.html#src.test_dataset.test_get_columns">test_get_columns() (in module src.test_dataset)</a> </li> </ul></td> <td style="width: 33%; vertical-align: top;"><ul> + <li><a href="source/src.html#src.test_dataset.test_get_dataframe">test_get_dataframe() (in module src.test_dataset)</a> +</li> <li><a href="source/src.html#src.test_dataset.test_get_is_narcissist_col">test_get_is_narcissist_col() (in module src.test_dataset)</a> +</li> + <li><a href="source/src.html#src.test_dataset.test_get_row_count">test_get_row_count() (in module src.test_dataset)</a> </li> <li><a href="source/src.html#src.test_dataset.test_get_sorted_columns">test_get_sorted_columns() (in module src.test_dataset)</a> </li> @@ -260,7 +287,7 @@ <h3>Navigation</h3> -<p class="caption" role="heading"><span class="caption-text">Contents:</span></p> +<p class="caption" role="heading"><span class="caption-text">Documentation contents:</span></p> <ul class="current"> <li class="toctree-l1 current"><a class="current reference internal" href="#">Index</a></li> <li class="toctree-l1"><a class="reference internal" href="search.html">Search Page</a></li> diff --git a/docs/_build/html/index.html b/docs/_build/html/index.html index e724919110c6817bbd657bf79786f797b1917228..1c9574f3d21dd4a327b6163fc95207e649eb37ea 100644 --- a/docs/_build/html/index.html +++ b/docs/_build/html/index.html @@ -31,24 +31,10 @@ <section id="welcome-to-this-project-s-documentation"> <h1>Welcome to this project’s documentation!<a class="headerlink" href="#welcome-to-this-project-s-documentation" title="Permalink to this heading">¶</a></h1> -<p>## Project Description</p> -<p>## Installation</p> -<p>## Usage</p> -<p>## Features</p> -<p>## Documentation</p> -<p>## Contributing</p> -<p>## Authors</p> -<p>## License - Open Source Commitment and FAIR Software Development</p> -<p>To embrace open source development and FAIR software development principles, -we would like to encourage anyone interested in the topic to help expand on this -software library and data analysis. To help with that, we have put together a -[Contribution Guideline](CONTRIBUTION.md) as well as a -[Code of Conduct](CONDUCT.md).</p> -<p>## Used Dataset</p> -<p>The dataset can be found [here](<a class="reference external" href="https://www.kaggle.com/datasets/divyansh22/online-gaming-anxiety-data">https://www.kaggle.com/datasets/divyansh22/online-gaming-anxiety-data</a>).</p> -<p>## Extra</p> +<p>This site contains the documentation of the functions written in this project.</p> +<p>For a more detailed introduction to this project, please see the <cite>README.md</cite> in the top-level directory of this project.</p> <div class="toctree-wrapper compound"> -<p class="caption" role="heading"><span class="caption-text">Contents:</span></p> +<p class="caption" role="heading"><span class="caption-text">Documentation contents:</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="genindex.html">Index</a></li> <li class="toctree-l1"><a class="reference internal" href="search.html">Search Page</a></li> @@ -85,7 +71,7 @@ software library and data analysis. To help with that, we have put together a <h3>Navigation</h3> -<p class="caption" role="heading"><span class="caption-text">Contents:</span></p> +<p class="caption" role="heading"><span class="caption-text">Documentation contents:</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="genindex.html">Index</a></li> <li class="toctree-l1"><a class="reference internal" href="search.html">Search Page</a></li> diff --git a/docs/_build/html/objects.inv b/docs/_build/html/objects.inv index 81a059f83ca3b173d974a20b2044b3aabfb4d48b..8ed5af02218ea230509c338432a70ab8b2a8f635 100644 Binary files a/docs/_build/html/objects.inv and b/docs/_build/html/objects.inv differ diff --git a/docs/_build/html/py-modindex.html b/docs/_build/html/py-modindex.html index 9f05c174b75079e145f0537099b9c6b173245e54..e4904d569a22460c8c1e41b9f298665406bdfcea 100644 --- a/docs/_build/html/py-modindex.html +++ b/docs/_build/html/py-modindex.html @@ -87,7 +87,7 @@ <h3>Navigation</h3> -<p class="caption" role="heading"><span class="caption-text">Contents:</span></p> +<p class="caption" role="heading"><span class="caption-text">Documentation contents:</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="genindex.html">Index</a></li> <li class="toctree-l1"><a class="reference internal" href="search.html">Search Page</a></li> diff --git a/docs/_build/html/search.html b/docs/_build/html/search.html index adbaf65179aaf66b9c61dcf45e393a54f39c8212..82f79f2a086add742695d48684d2f90351ef7f98 100644 --- a/docs/_build/html/search.html +++ b/docs/_build/html/search.html @@ -81,7 +81,7 @@ <h3>Navigation</h3> -<p class="caption" role="heading"><span class="caption-text">Contents:</span></p> +<p class="caption" role="heading"><span class="caption-text">Documentation contents:</span></p> <ul class="current"> <li class="toctree-l1"><a class="reference internal" href="genindex.html">Index</a></li> <li class="toctree-l1 current"><a class="current reference internal" href="#">Search Page</a></li> diff --git a/docs/_build/html/searchindex.js b/docs/_build/html/searchindex.js index bc942e0b8c1b151e85c6b0da88edf57bba5d8574..59d586dbaf14a4d1105b46c37cf58b26602a826f 100644 --- a/docs/_build/html/searchindex.js +++ b/docs/_build/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({"docnames": ["index", "source/modules", "source/src"], "filenames": ["index.rst", "source/modules.rst", "source/src.rst"], "titles": ["Welcome to this project\u2019s documentation!", "src", "src package"], "terms": {"descript": 0, "instal": 0, "usag": 0, "featur": 0, "contribut": 0, "author": 0, "licens": 0, "open": 0, "sourc": 0, "commit": 0, "fair": 0, "softwar": 0, "develop": 0, "To": 0, "embrac": 0, "principl": 0, "we": 0, "would": 0, "like": 0, "encourag": 0, "anyon": 0, "interest": 0, "topic": 0, "help": 0, "expand": 0, "librari": 0, "data": [0, 2], "analysi": 0, "have": 0, "put": 0, "togeth": 0, "guidelin": 0, "md": 0, "well": 0, "code": 0, "conduct": 0, "us": 0, "dataset": [0, 1], "The": [0, 2], "can": [0, 2], "found": 0, "here": 0, "http": 0, "www": 0, "kaggl": 0, "com": 0, "divyansh22": 0, "onlin": 0, "game": 0, "anxieti": [0, 2], "extra": 0, "index": 0, "search": 0, "page": 0, "src": 0, "packag": [0, 1], "modul": [0, 1], "submodul": 1, "get_category_count": [1, 2], "get_combined_anxiety_scor": [1, 2], "get_datafram": [1, 2], "get_is_competitive_col": [1, 2], "get_is_narcissist_col": [1, 2], "get_sorted_column": [1, 2], "get_unique_column_valu": [1, 2], "preprocess_dataset": [1, 2], "preprocess_whyplai": [1, 2], "remove_nonaccepting_row": [1, 2], "treat_outli": [1, 2], "plotter": 1, "customize_plot": [1, 2], "distribution_plot": [1, 2], "plot_categorical_bar_chart": [1, 2], "plot_categorical_boxplot": [1, 2], "plot_categorical_histplot": [1, 2], "plot_scatterplot": [1, 2], "test_dataset": 1, "test_bool_or_none_param": [1, 2], "test_catch_colname_not_in_df": [1, 2], "test_catch_colname_not_str": [1, 2], "test_catch_non_bool": [1, 2], "test_catch_non_datafram": [1, 2], "test_combined_anxiety_scor": [1, 2], "test_get_datafram": [1, 2], "test_get_is_narcissist_col": [1, 2], "test_get_sorted_column": [1, 2], "test_get_unique_column_valu": [1, 2], "test_incorrectly_load_dataset_class": [1, 2], "test_load_dataset_class": [1, 2], "test_preprocessed_datafram": [1, 2], "the_dataset": [1, 2], "test_plott": 1, "test_catch_plotter_init_not_dataset": [1, 2], "test_catch_styling_params_not_dict": [1, 2], "test_catch_target_not_str": [1, 2], "test_customize_plot": [1, 2], "test_distribution_plot": [1, 2], "test_load_plott": [1, 2], "test_plot_categorical_bar_chart": [1, 2], "test_plot_categorical_boxplot": [1, 2], "test_plot_categorical_histplot": [1, 2], "test_plot_scatterplot": [1, 2], "the_plott": [1, 2], "content": 1, "class": 2, "dataset_filenam": 2, "str": 2, "base": 2, "object": 2, "colnam": 2, "ascend": 2, "bool": 2, "none": 2, "seri": 2, "return": 2, "count": 2, "categor": 2, "valu": 2, "paramet": 2, "column": 2, "name": 2, "option": 2, "direct": 2, "sort": 2, "result": 2, "If": 2, "set": 2, "ar": 2, "default": 2, "categori": 2, "type": 2, "pd": 2, "datafram": 2, "get": 2, "combin": 2, "score": 2, "thi": 2, "i": 2, "gan": 2, "spin": 2, "swl": 2, "metric": 2, "each": 2, "three": 2, "first": 2, "normalis": 2, "mean": 2, "rais": 2, "valueerror": 2, "A": 2, "getter": 2, "function": 2, "arrai": 2, "defin": 2, "whether": 2, "person": 2, "competit": 2, "np": 2, "boolean": 2, "narcissist": 2, "narciss": 2, "1": 2, "0": 2, "consid": 2, "Not": 2, "while": 2, "all": 2, "abov": 2, "true": 2, "singl": 2, "either": 2, "descend": 2, "see": 2, "get_dataset_column": 2, "order": 2, "an": 2, "string": 2, "contain": 2, "uniqu": 2, "present": 2, "raw_datafram": 2, "preprocess": 2, "immedi": 2, "after": 2, "load": 2, "raw": 2, "read": 2, "from": 2, "read_csv": 2, "discard": 2, "afterward": 2, "whyplai": 2, "is_competit": 2, "col": 2, "remov": 2, "row": 2, "where": 2, "particip": 2, "did": 2, "consent": 2, "process": 2, "df": 2, "treat": 2, "outlier": 2, "numer": 2, "filter": 2, "fig": 2, "ax": 2, "styling_param": 2, "plt": 2, "figur": 2, "dict": 2, "target": 2, "plot": 2, "distribut": 2, "must": 2, "category1": 2, "category2": 2, "bar": 2, "chart": 2, "boxplot": 2, "bin": 2, "30": 2, "hisplot": 2, "target1": 2, "target2": 2, "scatterplot": 2, "test": 2, "file": 2, "py": 2, "param": 2, "take": 2, "correctli": 2, "work": 2, "intend": 2, "catch": 2, "incorrect": 2, "input": 2, "init": 2, "successfulli": 2, "initialis": 2, "instanc": 2, "fixtur": 2, "": 2, "actual": 2, "non": 2, "dictionari": 2}, "objects": {"": [[2, 0, 0, "-", "src"]], "src": [[2, 0, 0, "-", "Dataset"], [2, 0, 0, "-", "Plotter"], [2, 0, 0, "-", "test_dataset"], [2, 0, 0, "-", "test_plotter"]], "src.Dataset": [[2, 1, 1, "", "Dataset"]], "src.Dataset.Dataset": [[2, 2, 1, "", "get_category_counts"], [2, 2, 1, "", "get_combined_anxiety_score"], [2, 2, 1, "", "get_dataframe"], [2, 2, 1, "", "get_is_competitive_col"], [2, 2, 1, "", "get_is_narcissist_col"], [2, 2, 1, "", "get_sorted_column"], [2, 2, 1, "", "get_unique_column_values"], [2, 2, 1, "", "preprocess_dataset"], [2, 2, 1, "", "preprocess_whyplay"], [2, 2, 1, "", "remove_nonaccepting_rows"], [2, 2, 1, "", "treat_outliers"]], "src.Plotter": [[2, 1, 1, "", "Plotter"]], "src.Plotter.Plotter": [[2, 2, 1, "", "customize_plot"], [2, 2, 1, "", "distribution_plot"], [2, 2, 1, "", "plot_categorical_bar_chart"], [2, 2, 1, "", "plot_categorical_boxplot"], [2, 2, 1, "", "plot_categorical_histplot"], [2, 2, 1, "", "plot_scatterplot"]], "src.test_dataset": [[2, 3, 1, "", "test_bool_or_none_params"], [2, 3, 1, "", "test_catch_colname_not_in_df"], [2, 3, 1, "", "test_catch_colname_not_string"], [2, 3, 1, "", "test_catch_non_bool"], [2, 3, 1, "", "test_catch_non_dataframe"], [2, 3, 1, "", "test_combined_anxiety_score"], [2, 3, 1, "", "test_get_dataframe"], [2, 3, 1, "", "test_get_is_narcissist_col"], [2, 3, 1, "", "test_get_sorted_columns"], [2, 3, 1, "", "test_get_unique_column_values"], [2, 3, 1, "", "test_incorrectly_load_Dataset_class"], [2, 3, 1, "", "test_load_Dataset_class"], [2, 3, 1, "", "test_preprocessed_dataframe"], [2, 3, 1, "", "the_dataset"]], "src.test_plotter": [[2, 3, 1, "", "test_catch_colname_not_in_df"], [2, 3, 1, "", "test_catch_plotter_init_not_Dataset"], [2, 3, 1, "", "test_catch_styling_params_not_dict"], [2, 3, 1, "", "test_catch_target_not_string"], [2, 3, 1, "", "test_customize_plot"], [2, 3, 1, "", "test_distribution_plot"], [2, 3, 1, "", "test_load_plotter"], [2, 3, 1, "", "test_plot_categorical_bar_chart"], [2, 3, 1, "", "test_plot_categorical_boxplot"], [2, 3, 1, "", "test_plot_categorical_histplot"], [2, 3, 1, "", "test_plot_scatterplot"], [2, 3, 1, "", "the_plotter"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method", "3": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "function", "Python function"]}, "titleterms": {"welcom": 0, "thi": 0, "project": 0, "": 0, "document": 0, "content": [0, 2], "indic": 0, "tabl": 0, "src": [1, 2], "packag": 2, "submodul": 2, "dataset": 2, "modul": 2, "plotter": 2, "test_dataset": 2, "test_plott": 2}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 57}, "alltitles": {"Welcome to this project\u2019s documentation!": [[0, "welcome-to-this-project-s-documentation"]], "Contents:": [[0, null]], "Indices and tables": [[0, "indices-and-tables"]], "src": [[1, "src"]], "src package": [[2, "src-package"]], "Submodules": [[2, "submodules"]], "src.Dataset module": [[2, "module-src.Dataset"]], "src.Plotter module": [[2, "module-src.Plotter"]], "src.test_dataset module": [[2, "module-src.test_dataset"]], "src.test_plotter module": [[2, "module-src.test_plotter"]], "Module contents": [[2, "module-src"]]}, "indexentries": {"dataset (class in src.dataset)": [[2, "src.Dataset.Dataset"]], "plotter (class in src.plotter)": [[2, "src.Plotter.Plotter"]], "customize_plot() (src.plotter.plotter method)": [[2, "src.Plotter.Plotter.customize_plot"]], "distribution_plot() (src.plotter.plotter method)": [[2, "src.Plotter.Plotter.distribution_plot"]], "get_category_counts() (src.dataset.dataset method)": [[2, "src.Dataset.Dataset.get_category_counts"]], "get_combined_anxiety_score() (src.dataset.dataset method)": [[2, "src.Dataset.Dataset.get_combined_anxiety_score"]], "get_dataframe() (src.dataset.dataset method)": [[2, "src.Dataset.Dataset.get_dataframe"]], "get_is_competitive_col() (src.dataset.dataset method)": [[2, "src.Dataset.Dataset.get_is_competitive_col"]], "get_is_narcissist_col() (src.dataset.dataset method)": [[2, "src.Dataset.Dataset.get_is_narcissist_col"]], "get_sorted_column() (src.dataset.dataset method)": [[2, "src.Dataset.Dataset.get_sorted_column"]], "get_unique_column_values() (src.dataset.dataset method)": [[2, "src.Dataset.Dataset.get_unique_column_values"]], "module": [[2, "module-src"], [2, "module-src.Dataset"], [2, "module-src.Plotter"], [2, "module-src.test_dataset"], [2, "module-src.test_plotter"]], "plot_categorical_bar_chart() (src.plotter.plotter method)": [[2, "src.Plotter.Plotter.plot_categorical_bar_chart"]], "plot_categorical_boxplot() (src.plotter.plotter method)": [[2, "src.Plotter.Plotter.plot_categorical_boxplot"]], "plot_categorical_histplot() (src.plotter.plotter method)": [[2, "src.Plotter.Plotter.plot_categorical_histplot"]], "plot_scatterplot() (src.plotter.plotter method)": [[2, "src.Plotter.Plotter.plot_scatterplot"]], "preprocess_dataset() (src.dataset.dataset method)": [[2, "src.Dataset.Dataset.preprocess_dataset"]], "preprocess_whyplay() (src.dataset.dataset method)": [[2, "src.Dataset.Dataset.preprocess_whyplay"]], "remove_nonaccepting_rows() (src.dataset.dataset method)": [[2, "src.Dataset.Dataset.remove_nonaccepting_rows"]], "src": [[2, "module-src"]], "src.dataset": [[2, "module-src.Dataset"]], "src.plotter": [[2, "module-src.Plotter"]], "src.test_dataset": [[2, "module-src.test_dataset"]], "src.test_plotter": [[2, "module-src.test_plotter"]], "test_bool_or_none_params() (in module src.test_dataset)": [[2, "src.test_dataset.test_bool_or_none_params"]], "test_catch_colname_not_in_df() (in module src.test_dataset)": [[2, "src.test_dataset.test_catch_colname_not_in_df"]], "test_catch_colname_not_in_df() (in module src.test_plotter)": [[2, "src.test_plotter.test_catch_colname_not_in_df"]], "test_catch_colname_not_string() (in module src.test_dataset)": [[2, "src.test_dataset.test_catch_colname_not_string"]], "test_catch_non_bool() (in module src.test_dataset)": [[2, "src.test_dataset.test_catch_non_bool"]], "test_catch_non_dataframe() (in module src.test_dataset)": [[2, "src.test_dataset.test_catch_non_dataframe"]], "test_catch_plotter_init_not_dataset() (in module src.test_plotter)": [[2, "src.test_plotter.test_catch_plotter_init_not_Dataset"]], "test_catch_styling_params_not_dict() (in module src.test_plotter)": [[2, "src.test_plotter.test_catch_styling_params_not_dict"]], "test_catch_target_not_string() (in module src.test_plotter)": [[2, "src.test_plotter.test_catch_target_not_string"]], "test_combined_anxiety_score() (in module src.test_dataset)": [[2, "src.test_dataset.test_combined_anxiety_score"]], "test_customize_plot() (in module src.test_plotter)": [[2, "src.test_plotter.test_customize_plot"]], "test_distribution_plot() (in module src.test_plotter)": [[2, "src.test_plotter.test_distribution_plot"]], "test_get_dataframe() (in module src.test_dataset)": [[2, "src.test_dataset.test_get_dataframe"]], "test_get_is_narcissist_col() (in module src.test_dataset)": [[2, "src.test_dataset.test_get_is_narcissist_col"]], "test_get_sorted_columns() (in module src.test_dataset)": [[2, "src.test_dataset.test_get_sorted_columns"]], "test_get_unique_column_values() (in module src.test_dataset)": [[2, "src.test_dataset.test_get_unique_column_values"]], "test_incorrectly_load_dataset_class() (in module src.test_dataset)": [[2, "src.test_dataset.test_incorrectly_load_Dataset_class"]], "test_load_dataset_class() (in module src.test_dataset)": [[2, "src.test_dataset.test_load_Dataset_class"]], "test_load_plotter() (in module src.test_plotter)": [[2, "src.test_plotter.test_load_plotter"]], "test_plot_categorical_bar_chart() (in module src.test_plotter)": [[2, "src.test_plotter.test_plot_categorical_bar_chart"]], "test_plot_categorical_boxplot() (in module src.test_plotter)": [[2, "src.test_plotter.test_plot_categorical_boxplot"]], "test_plot_categorical_histplot() (in module src.test_plotter)": [[2, "src.test_plotter.test_plot_categorical_histplot"]], "test_plot_scatterplot() (in module src.test_plotter)": [[2, "src.test_plotter.test_plot_scatterplot"]], "test_preprocessed_dataframe() (in module src.test_dataset)": [[2, "src.test_dataset.test_preprocessed_dataframe"]], "the_dataset() (in module src.test_dataset)": [[2, "src.test_dataset.the_dataset"]], "the_plotter() (in module src.test_plotter)": [[2, "src.test_plotter.the_plotter"]], "treat_outliers() (src.dataset.dataset method)": [[2, "src.Dataset.Dataset.treat_outliers"]]}}) \ No newline at end of file +Search.setIndex({"docnames": ["index", "source/modules", "source/src"], "filenames": ["index.rst", "source/modules.rst", "source/src.rst"], "titles": ["Welcome to this project\u2019s documentation!", "src", "src package"], "terms": {"site": 0, "contain": [0, 2], "function": [0, 2], "written": 0, "For": 0, "more": 0, "detail": 0, "introduct": 0, "pleas": 0, "see": [0, 2], "readm": 0, "md": 0, "top": 0, "level": 0, "directori": 0, "index": [0, 2], "search": 0, "page": 0, "src": 0, "packag": [0, 1], "modul": [0, 1], "submodul": 1, "dataset": 1, "filtered_row": [1, 2], "get_category_count": [1, 2], "get_column_count": [1, 2], "get_column_mean": [1, 2], "get_column": [1, 2], "get_combined_anxiety_scor": [1, 2], "get_datafram": [1, 2], "get_is_competitive_col": [1, 2], "get_is_narcissist_col": [1, 2], "get_row_count": [1, 2], "get_sorted_column": [1, 2], "get_unique_column_valu": [1, 2], "preprocess_dataset": [1, 2], "preprocess_whyplai": [1, 2], "remove_nonaccepting_row": [1, 2], "treat_outli": [1, 2], "plotter": 1, "customize_plot": [1, 2], "distribution_plot": [1, 2], "plot_categorical_bar_chart": [1, 2], "plot_categorical_boxplot": [1, 2], "plot_categorical_histplot": [1, 2], "plot_scatterplot": [1, 2], "test_dataset": 1, "test_bool_or_none_param": [1, 2], "test_catch_colname_not_in_df": [1, 2], "test_catch_colname_not_str": [1, 2], "test_catch_non_bool": [1, 2], "test_catch_non_datafram": [1, 2], "test_combined_anxiety_scor": [1, 2], "test_filtered_row": [1, 2], "test_get_column_count": [1, 2], "test_get_column_mean": [1, 2], "test_get_column": [1, 2], "test_get_datafram": [1, 2], "test_get_is_narcissist_col": [1, 2], "test_get_row_count": [1, 2], "test_get_sorted_column": [1, 2], "test_get_unique_column_valu": [1, 2], "test_incorrectly_load_dataset_class": [1, 2], "test_load_dataset_class": [1, 2], "test_preprocessed_datafram": [1, 2], "the_dataset": [1, 2], "test_plott": 1, "test_catch_plotter_init_not_dataset": [1, 2], "test_catch_styling_params_not_dict": [1, 2], "test_catch_target_not_str": [1, 2], "test_customize_plot": [1, 2], "test_distribution_plot": [1, 2], "test_load_plott": [1, 2], "test_plot_categorical_bar_chart": [1, 2], "test_plot_categorical_boxplot": [1, 2], "test_plot_categorical_histplot": [1, 2], "test_plot_scatterplot": [1, 2], "the_plott": [1, 2], "content": 1, "class": 2, "dataset_filenam": 2, "str": 2, "base": 2, "object": 2, "colnam": 2, "criteria": 2, "datafram": 2, "return": 2, "filter": 2, "where": 2, "paramet": 2, "column": 2, "includ": 2, "valu": 2, "you": 2, "want": 2, "match": 2, "all": 2, "row": 2, "keep": 2, "type": 2, "pd": 2, "ascend": 2, "bool": 2, "none": 2, "seri": 2, "count": 2, "categor": 2, "name": 2, "option": 2, "direct": 2, "sort": 2, "result": 2, "If": 2, "set": 2, "ar": 2, "default": 2, "categori": 2, "int": 2, "amount": 2, "number": 2, "mean": 2, "entri": 2, "one": 2, "can": 2, "obtain": 2, "call": 2, "header": 2, "list": 2, "core": 2, "get": 2, "combin": 2, "anxieti": 2, "score": 2, "thi": 2, "i": 2, "gan": 2, "spin": 2, "swl": 2, "metric": 2, "each": 2, "three": 2, "first": 2, "normalis": 2, "rais": 2, "valueerror": 2, "A": 2, "getter": 2, "arrai": 2, "defin": 2, "whether": 2, "person": 2, "competit": 2, "np": 2, "boolean": 2, "narcissist": 2, "The": 2, "narciss": 2, "1": 2, "0": 2, "consid": 2, "Not": 2, "while": 2, "abov": 2, "true": 2, "singl": 2, "either": 2, "descend": 2, "get_dataset_column": 2, "order": 2, "an": 2, "string": 2, "uniqu": 2, "present": 2, "raw_datafram": 2, "preprocess": 2, "immedi": 2, "after": 2, "load": 2, "raw": 2, "read": 2, "from": 2, "read_csv": 2, "discard": 2, "afterward": 2, "whyplai": 2, "is_competit": 2, "col": 2, "remov": 2, "particip": 2, "did": 2, "consent": 2, "data": 2, "process": 2, "df": 2, "treat": 2, "outlier": 2, "numer": 2, "fig": 2, "ax": 2, "styling_param": 2, "plt": 2, "figur": 2, "dict": 2, "target": 2, "plot": 2, "distribut": 2, "must": 2, "category1": 2, "category2": 2, "bar": 2, "chart": 2, "boxplot": 2, "bin": 2, "30": 2, "hisplot": 2, "target1": 2, "target2": 2, "scatterplot": 2, "test": 2, "file": 2, "py": 2, "param": 2, "take": 2, "correctli": 2, "work": 2, "intend": 2, "catch": 2, "incorrect": 2, "input": 2, "init": 2, "successfulli": 2, "initialis": 2, "instanc": 2, "fixtur": 2, "": 2, "actual": 2, "non": 2, "dictionari": 2}, "objects": {"": [[2, 0, 0, "-", "src"]], "src": [[2, 0, 0, "-", "Dataset"], [2, 0, 0, "-", "Plotter"], [2, 0, 0, "-", "test_dataset"], [2, 0, 0, "-", "test_plotter"]], "src.Dataset": [[2, 1, 1, "", "Dataset"]], "src.Dataset.Dataset": [[2, 2, 1, "", "filtered_rows"], [2, 2, 1, "", "get_category_counts"], [2, 2, 1, "", "get_column_count"], [2, 2, 1, "", "get_column_mean"], [2, 2, 1, "", "get_columns"], [2, 2, 1, "", "get_combined_anxiety_score"], [2, 2, 1, "", "get_dataframe"], [2, 2, 1, "", "get_is_competitive_col"], [2, 2, 1, "", "get_is_narcissist_col"], [2, 2, 1, "", "get_row_count"], [2, 2, 1, "", "get_sorted_column"], [2, 2, 1, "", "get_unique_column_values"], [2, 2, 1, "", "preprocess_dataset"], [2, 2, 1, "", "preprocess_whyplay"], [2, 2, 1, "", "remove_nonaccepting_rows"], [2, 2, 1, "", "treat_outliers"]], "src.Plotter": [[2, 1, 1, "", "Plotter"]], "src.Plotter.Plotter": [[2, 2, 1, "", "customize_plot"], [2, 2, 1, "", "distribution_plot"], [2, 2, 1, "", "plot_categorical_bar_chart"], [2, 2, 1, "", "plot_categorical_boxplot"], [2, 2, 1, "", "plot_categorical_histplot"], [2, 2, 1, "", "plot_scatterplot"]], "src.test_dataset": [[2, 3, 1, "", "test_bool_or_none_params"], [2, 3, 1, "", "test_catch_colname_not_in_df"], [2, 3, 1, "", "test_catch_colname_not_string"], [2, 3, 1, "", "test_catch_non_bool"], [2, 3, 1, "", "test_catch_non_dataframe"], [2, 3, 1, "", "test_combined_anxiety_score"], [2, 3, 1, "", "test_filtered_rows"], [2, 3, 1, "", "test_get_column_count"], [2, 3, 1, "", "test_get_column_mean"], [2, 3, 1, "", "test_get_columns"], [2, 3, 1, "", "test_get_dataframe"], [2, 3, 1, "", "test_get_is_narcissist_col"], [2, 3, 1, "", "test_get_row_count"], [2, 3, 1, "", "test_get_sorted_columns"], [2, 3, 1, "", "test_get_unique_column_values"], [2, 3, 1, "", "test_incorrectly_load_Dataset_class"], [2, 3, 1, "", "test_load_Dataset_class"], [2, 3, 1, "", "test_preprocessed_dataframe"], [2, 3, 1, "", "the_dataset"]], "src.test_plotter": [[2, 3, 1, "", "test_catch_colname_not_in_df"], [2, 3, 1, "", "test_catch_plotter_init_not_Dataset"], [2, 3, 1, "", "test_catch_styling_params_not_dict"], [2, 3, 1, "", "test_catch_target_not_string"], [2, 3, 1, "", "test_customize_plot"], [2, 3, 1, "", "test_distribution_plot"], [2, 3, 1, "", "test_load_plotter"], [2, 3, 1, "", "test_plot_categorical_bar_chart"], [2, 3, 1, "", "test_plot_categorical_boxplot"], [2, 3, 1, "", "test_plot_categorical_histplot"], [2, 3, 1, "", "test_plot_scatterplot"], [2, 3, 1, "", "the_plotter"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method", "3": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "function", "Python function"]}, "titleterms": {"welcom": 0, "thi": 0, "project": 0, "": 0, "document": 0, "content": [0, 2], "indic": 0, "tabl": 0, "src": [1, 2], "packag": 2, "submodul": 2, "dataset": 2, "modul": 2, "plotter": 2, "test_dataset": 2, "test_plott": 2}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 57}, "alltitles": {"Welcome to this project\u2019s documentation!": [[0, "welcome-to-this-project-s-documentation"]], "Documentation contents:": [[0, null]], "Indices and tables": [[0, "indices-and-tables"]], "src": [[1, "src"]], "src package": [[2, "src-package"]], "Submodules": [[2, "submodules"]], "src.Dataset module": [[2, "module-src.Dataset"]], "src.Plotter module": [[2, "module-src.Plotter"]], "src.test_dataset module": [[2, "module-src.test_dataset"]], "src.test_plotter module": [[2, "module-src.test_plotter"]], "Module contents": [[2, "module-src"]]}, "indexentries": {"dataset (class in src.dataset)": [[2, "src.Dataset.Dataset"]], "plotter (class in src.plotter)": [[2, "src.Plotter.Plotter"]], "customize_plot() (src.plotter.plotter method)": [[2, "src.Plotter.Plotter.customize_plot"]], "distribution_plot() (src.plotter.plotter method)": [[2, "src.Plotter.Plotter.distribution_plot"]], "filtered_rows() (src.dataset.dataset method)": [[2, "src.Dataset.Dataset.filtered_rows"]], "get_category_counts() (src.dataset.dataset method)": [[2, "src.Dataset.Dataset.get_category_counts"]], "get_column_count() (src.dataset.dataset method)": [[2, "src.Dataset.Dataset.get_column_count"]], "get_column_mean() (src.dataset.dataset method)": [[2, "src.Dataset.Dataset.get_column_mean"]], "get_columns() (src.dataset.dataset method)": [[2, "src.Dataset.Dataset.get_columns"]], "get_combined_anxiety_score() (src.dataset.dataset method)": [[2, "src.Dataset.Dataset.get_combined_anxiety_score"]], "get_dataframe() (src.dataset.dataset method)": [[2, "src.Dataset.Dataset.get_dataframe"]], "get_is_competitive_col() (src.dataset.dataset method)": [[2, "src.Dataset.Dataset.get_is_competitive_col"]], "get_is_narcissist_col() (src.dataset.dataset method)": [[2, "src.Dataset.Dataset.get_is_narcissist_col"]], "get_row_count() (src.dataset.dataset method)": [[2, "src.Dataset.Dataset.get_row_count"]], "get_sorted_column() (src.dataset.dataset method)": [[2, "src.Dataset.Dataset.get_sorted_column"]], "get_unique_column_values() (src.dataset.dataset method)": [[2, "src.Dataset.Dataset.get_unique_column_values"]], "module": [[2, "module-src"], [2, "module-src.Dataset"], [2, "module-src.Plotter"], [2, "module-src.test_dataset"], [2, "module-src.test_plotter"]], "plot_categorical_bar_chart() (src.plotter.plotter method)": [[2, "src.Plotter.Plotter.plot_categorical_bar_chart"]], "plot_categorical_boxplot() (src.plotter.plotter method)": [[2, "src.Plotter.Plotter.plot_categorical_boxplot"]], "plot_categorical_histplot() (src.plotter.plotter method)": [[2, "src.Plotter.Plotter.plot_categorical_histplot"]], "plot_scatterplot() (src.plotter.plotter method)": [[2, "src.Plotter.Plotter.plot_scatterplot"]], "preprocess_dataset() (src.dataset.dataset method)": [[2, "src.Dataset.Dataset.preprocess_dataset"]], "preprocess_whyplay() (src.dataset.dataset method)": [[2, "src.Dataset.Dataset.preprocess_whyplay"]], "remove_nonaccepting_rows() (src.dataset.dataset method)": [[2, "src.Dataset.Dataset.remove_nonaccepting_rows"]], "src": [[2, "module-src"]], "src.dataset": [[2, "module-src.Dataset"]], "src.plotter": [[2, "module-src.Plotter"]], "src.test_dataset": [[2, "module-src.test_dataset"]], "src.test_plotter": [[2, "module-src.test_plotter"]], "test_bool_or_none_params() (in module src.test_dataset)": [[2, "src.test_dataset.test_bool_or_none_params"]], "test_catch_colname_not_in_df() (in module src.test_dataset)": [[2, "src.test_dataset.test_catch_colname_not_in_df"]], "test_catch_colname_not_in_df() (in module src.test_plotter)": [[2, "src.test_plotter.test_catch_colname_not_in_df"]], "test_catch_colname_not_string() (in module src.test_dataset)": [[2, "src.test_dataset.test_catch_colname_not_string"]], "test_catch_non_bool() (in module src.test_dataset)": [[2, "src.test_dataset.test_catch_non_bool"]], "test_catch_non_dataframe() (in module src.test_dataset)": [[2, "src.test_dataset.test_catch_non_dataframe"]], "test_catch_plotter_init_not_dataset() (in module src.test_plotter)": [[2, "src.test_plotter.test_catch_plotter_init_not_Dataset"]], "test_catch_styling_params_not_dict() (in module src.test_plotter)": [[2, "src.test_plotter.test_catch_styling_params_not_dict"]], "test_catch_target_not_string() (in module src.test_plotter)": [[2, "src.test_plotter.test_catch_target_not_string"]], "test_combined_anxiety_score() (in module src.test_dataset)": [[2, "src.test_dataset.test_combined_anxiety_score"]], "test_customize_plot() (in module src.test_plotter)": [[2, "src.test_plotter.test_customize_plot"]], "test_distribution_plot() (in module src.test_plotter)": [[2, "src.test_plotter.test_distribution_plot"]], "test_filtered_rows() (in module src.test_dataset)": [[2, "src.test_dataset.test_filtered_rows"]], "test_get_column_count() (in module src.test_dataset)": [[2, "src.test_dataset.test_get_column_count"]], "test_get_column_mean() (in module src.test_dataset)": [[2, "src.test_dataset.test_get_column_mean"]], "test_get_columns() (in module src.test_dataset)": [[2, "src.test_dataset.test_get_columns"]], "test_get_dataframe() (in module src.test_dataset)": [[2, "src.test_dataset.test_get_dataframe"]], "test_get_is_narcissist_col() (in module src.test_dataset)": [[2, "src.test_dataset.test_get_is_narcissist_col"]], "test_get_row_count() (in module src.test_dataset)": [[2, "src.test_dataset.test_get_row_count"]], "test_get_sorted_columns() (in module src.test_dataset)": [[2, "src.test_dataset.test_get_sorted_columns"]], "test_get_unique_column_values() (in module src.test_dataset)": [[2, "src.test_dataset.test_get_unique_column_values"]], "test_incorrectly_load_dataset_class() (in module src.test_dataset)": [[2, "src.test_dataset.test_incorrectly_load_Dataset_class"]], "test_load_dataset_class() (in module src.test_dataset)": [[2, "src.test_dataset.test_load_Dataset_class"]], "test_load_plotter() (in module src.test_plotter)": [[2, "src.test_plotter.test_load_plotter"]], "test_plot_categorical_bar_chart() (in module src.test_plotter)": [[2, "src.test_plotter.test_plot_categorical_bar_chart"]], "test_plot_categorical_boxplot() (in module src.test_plotter)": [[2, "src.test_plotter.test_plot_categorical_boxplot"]], "test_plot_categorical_histplot() (in module src.test_plotter)": [[2, "src.test_plotter.test_plot_categorical_histplot"]], "test_plot_scatterplot() (in module src.test_plotter)": [[2, "src.test_plotter.test_plot_scatterplot"]], "test_preprocessed_dataframe() (in module src.test_dataset)": [[2, "src.test_dataset.test_preprocessed_dataframe"]], "the_dataset() (in module src.test_dataset)": [[2, "src.test_dataset.the_dataset"]], "the_plotter() (in module src.test_plotter)": [[2, "src.test_plotter.the_plotter"]], "treat_outliers() (src.dataset.dataset method)": [[2, "src.Dataset.Dataset.treat_outliers"]]}}) \ No newline at end of file diff --git a/docs/_build/html/source/modules.html b/docs/_build/html/source/modules.html index 56bfa821cdac51302f0cff539d505868f4544ebe..7ad83df5adec53c1fec8c6403d022119e9324ff8 100644 --- a/docs/_build/html/source/modules.html +++ b/docs/_build/html/source/modules.html @@ -38,11 +38,16 @@ <li class="toctree-l2"><a class="reference internal" href="src.html#submodules">Submodules</a></li> <li class="toctree-l2"><a class="reference internal" href="src.html#module-src.Dataset">src.Dataset module</a><ul> <li class="toctree-l3"><a class="reference internal" href="src.html#src.Dataset.Dataset"><code class="docutils literal notranslate"><span class="pre">Dataset</span></code></a><ul> +<li class="toctree-l4"><a class="reference internal" href="src.html#src.Dataset.Dataset.filtered_rows"><code class="docutils literal notranslate"><span class="pre">Dataset.filtered_rows()</span></code></a></li> <li class="toctree-l4"><a class="reference internal" href="src.html#src.Dataset.Dataset.get_category_counts"><code class="docutils literal notranslate"><span class="pre">Dataset.get_category_counts()</span></code></a></li> +<li class="toctree-l4"><a class="reference internal" href="src.html#src.Dataset.Dataset.get_column_count"><code class="docutils literal notranslate"><span class="pre">Dataset.get_column_count()</span></code></a></li> +<li class="toctree-l4"><a class="reference internal" href="src.html#src.Dataset.Dataset.get_column_mean"><code class="docutils literal notranslate"><span class="pre">Dataset.get_column_mean()</span></code></a></li> +<li class="toctree-l4"><a class="reference internal" href="src.html#src.Dataset.Dataset.get_columns"><code class="docutils literal notranslate"><span class="pre">Dataset.get_columns()</span></code></a></li> <li class="toctree-l4"><a class="reference internal" href="src.html#src.Dataset.Dataset.get_combined_anxiety_score"><code class="docutils literal notranslate"><span class="pre">Dataset.get_combined_anxiety_score()</span></code></a></li> <li class="toctree-l4"><a class="reference internal" href="src.html#src.Dataset.Dataset.get_dataframe"><code class="docutils literal notranslate"><span class="pre">Dataset.get_dataframe()</span></code></a></li> <li class="toctree-l4"><a class="reference internal" href="src.html#src.Dataset.Dataset.get_is_competitive_col"><code class="docutils literal notranslate"><span class="pre">Dataset.get_is_competitive_col()</span></code></a></li> <li class="toctree-l4"><a class="reference internal" href="src.html#src.Dataset.Dataset.get_is_narcissist_col"><code class="docutils literal notranslate"><span class="pre">Dataset.get_is_narcissist_col()</span></code></a></li> +<li class="toctree-l4"><a class="reference internal" href="src.html#src.Dataset.Dataset.get_row_count"><code class="docutils literal notranslate"><span class="pre">Dataset.get_row_count()</span></code></a></li> <li class="toctree-l4"><a class="reference internal" href="src.html#src.Dataset.Dataset.get_sorted_column"><code class="docutils literal notranslate"><span class="pre">Dataset.get_sorted_column()</span></code></a></li> <li class="toctree-l4"><a class="reference internal" href="src.html#src.Dataset.Dataset.get_unique_column_values"><code class="docutils literal notranslate"><span class="pre">Dataset.get_unique_column_values()</span></code></a></li> <li class="toctree-l4"><a class="reference internal" href="src.html#src.Dataset.Dataset.preprocess_dataset"><code class="docutils literal notranslate"><span class="pre">Dataset.preprocess_dataset()</span></code></a></li> @@ -72,8 +77,13 @@ <li class="toctree-l3"><a class="reference internal" href="src.html#src.test_dataset.test_catch_non_bool"><code class="docutils literal notranslate"><span class="pre">test_catch_non_bool()</span></code></a></li> <li class="toctree-l3"><a class="reference internal" href="src.html#src.test_dataset.test_catch_non_dataframe"><code class="docutils literal notranslate"><span class="pre">test_catch_non_dataframe()</span></code></a></li> <li class="toctree-l3"><a class="reference internal" href="src.html#src.test_dataset.test_combined_anxiety_score"><code class="docutils literal notranslate"><span class="pre">test_combined_anxiety_score()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="src.html#src.test_dataset.test_filtered_rows"><code class="docutils literal notranslate"><span class="pre">test_filtered_rows()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="src.html#src.test_dataset.test_get_column_count"><code class="docutils literal notranslate"><span class="pre">test_get_column_count()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="src.html#src.test_dataset.test_get_column_mean"><code class="docutils literal notranslate"><span class="pre">test_get_column_mean()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="src.html#src.test_dataset.test_get_columns"><code class="docutils literal notranslate"><span class="pre">test_get_columns()</span></code></a></li> <li class="toctree-l3"><a class="reference internal" href="src.html#src.test_dataset.test_get_dataframe"><code class="docutils literal notranslate"><span class="pre">test_get_dataframe()</span></code></a></li> <li class="toctree-l3"><a class="reference internal" href="src.html#src.test_dataset.test_get_is_narcissist_col"><code class="docutils literal notranslate"><span class="pre">test_get_is_narcissist_col()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="src.html#src.test_dataset.test_get_row_count"><code class="docutils literal notranslate"><span class="pre">test_get_row_count()</span></code></a></li> <li class="toctree-l3"><a class="reference internal" href="src.html#src.test_dataset.test_get_sorted_columns"><code class="docutils literal notranslate"><span class="pre">test_get_sorted_columns()</span></code></a></li> <li class="toctree-l3"><a class="reference internal" href="src.html#src.test_dataset.test_get_unique_column_values"><code class="docutils literal notranslate"><span class="pre">test_get_unique_column_values()</span></code></a></li> <li class="toctree-l3"><a class="reference internal" href="src.html#src.test_dataset.test_incorrectly_load_Dataset_class"><code class="docutils literal notranslate"><span class="pre">test_incorrectly_load_Dataset_class()</span></code></a></li> @@ -121,7 +131,7 @@ <h3>Navigation</h3> -<p class="caption" role="heading"><span class="caption-text">Contents:</span></p> +<p class="caption" role="heading"><span class="caption-text">Documentation contents:</span></p> <ul class="current"> <li class="toctree-l1"><a class="reference internal" href="../genindex.html">Index</a></li> <li class="toctree-l1"><a class="reference internal" href="../search.html">Search Page</a></li> diff --git a/docs/_build/html/source/src.html b/docs/_build/html/source/src.html index 3be4801f845f76b330c15f6f79d7e605f84856dd..7ea3ef14bc16284cfce213362003012a3acabf74 100644 --- a/docs/_build/html/source/src.html +++ b/docs/_build/html/source/src.html @@ -41,6 +41,26 @@ <dt class="sig sig-object py" id="src.Dataset.Dataset"> <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">src.Dataset.</span></span><span class="sig-name descname"><span class="pre">Dataset</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dataset_filename</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#src.Dataset.Dataset" title="Permalink to this definition">¶</a></dt> <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p> +<dl class="py method"> +<dt class="sig sig-object py" id="src.Dataset.Dataset.filtered_rows"> +<span class="sig-name descname"><span class="pre">filtered_rows</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">colname</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">criteria</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">DataFrame</span></span></span><a class="headerlink" href="#src.Dataset.Dataset.filtered_rows" title="Permalink to this definition">¶</a></dt> +<dd><p>Return a filtered dataframe where <cite>colname</cite> == <cite>criteria</cite>.</p> +<dl class="field-list simple"> +<dt class="field-odd">Parameters<span class="colon">:</span></dt> +<dd class="field-odd"><ul class="simple"> +<li><p><strong>colname</strong> (<em>str</em>) – Column including the value you want to filter by.</p></li> +<li><p><strong>criteria</strong> (<em>str</em>) – criteria that matches all the rows you want to keep</p></li> +</ul> +</dd> +<dt class="field-even">Returns<span class="colon">:</span></dt> +<dd class="field-even"><p>the filtered dataframe.</p> +</dd> +<dt class="field-odd">Return type<span class="colon">:</span></dt> +<dd class="field-odd"><p>pd.DataFrame</p> +</dd> +</dl> +</dd></dl> + <dl class="py method"> <dt class="sig sig-object py" id="src.Dataset.Dataset.get_category_counts"> <span class="sig-name descname"><span class="pre">get_category_counts</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">colname</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ascending</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">Series</span></span></span><a class="headerlink" href="#src.Dataset.Dataset.get_category_counts" title="Permalink to this definition">¶</a></dt> @@ -62,6 +82,54 @@ If set to None, the results are not sorted. Defaults to None.</p></li> </dl> </dd></dl> +<dl class="py method"> +<dt class="sig sig-object py" id="src.Dataset.Dataset.get_column_count"> +<span class="sig-name descname"><span class="pre">get_column_count</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">int</span></span></span><a class="headerlink" href="#src.Dataset.Dataset.get_column_count" title="Permalink to this definition">¶</a></dt> +<dd><p>Returns the amount of columns in the dataframe.</p> +<dl class="field-list simple"> +<dt class="field-odd">Returns<span class="colon">:</span></dt> +<dd class="field-odd"><p>number of columns.</p> +</dd> +<dt class="field-even">Return type<span class="colon">:</span></dt> +<dd class="field-even"><p>int</p> +</dd> +</dl> +</dd></dl> + +<dl class="py method"> +<dt class="sig sig-object py" id="src.Dataset.Dataset.get_column_mean"> +<span class="sig-name descname"><span class="pre">get_column_mean</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">colname</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">int</span></span></span><a class="headerlink" href="#src.Dataset.Dataset.get_column_mean" title="Permalink to this definition">¶</a></dt> +<dd><p>Returns the mean value of all entries in one column.</p> +<dl class="field-list simple"> +<dt class="field-odd">Parameters<span class="colon">:</span></dt> +<dd class="field-odd"><ul class="simple"> +<li><p><strong>colname</strong> (<em>str</em>) – Index of the columns in the dataframe.</p></li> +<li><p><strong>get_columns</strong> (<em>(</em><em>Indexes can be obtained by calling</em>) – </p></li> +</ul> +</dd> +<dt class="field-even">Returns<span class="colon">:</span></dt> +<dd class="field-even"><p>mean of <cite>colname</cite>.</p> +</dd> +<dt class="field-odd">Return type<span class="colon">:</span></dt> +<dd class="field-odd"><p>int</p> +</dd> +</dl> +</dd></dl> + +<dl class="py method"> +<dt class="sig sig-object py" id="src.Dataset.Dataset.get_columns"> +<span class="sig-name descname"><span class="pre">get_columns</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">Index</span></span></span><a class="headerlink" href="#src.Dataset.Dataset.get_columns" title="Permalink to this definition">¶</a></dt> +<dd><p>Returns all column headers/indexes.</p> +<dl class="field-list simple"> +<dt class="field-odd">Returns<span class="colon">:</span></dt> +<dd class="field-odd"><p>List of all column headers.</p> +</dd> +<dt class="field-even">Return type<span class="colon">:</span></dt> +<dd class="field-even"><p>pd.core.indexes.base.Index</p> +</dd> +</dl> +</dd></dl> + <dl class="py method"> <dt class="sig sig-object py" id="src.Dataset.Dataset.get_combined_anxiety_score"> <span class="sig-name descname"><span class="pre">get_combined_anxiety_score</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dataframe</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">DataFrame</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">Series</span></span></span><a class="headerlink" href="#src.Dataset.Dataset.get_combined_anxiety_score" title="Permalink to this definition">¶</a></dt> @@ -141,6 +209,20 @@ while all values above that are above are considered Narcissist.</p> </dl> </dd></dl> +<dl class="py method"> +<dt class="sig sig-object py" id="src.Dataset.Dataset.get_row_count"> +<span class="sig-name descname"><span class="pre">get_row_count</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">int</span></span></span><a class="headerlink" href="#src.Dataset.Dataset.get_row_count" title="Permalink to this definition">¶</a></dt> +<dd><p>Returns the amount of rows in the dataframe.</p> +<dl class="field-list simple"> +<dt class="field-odd">Returns<span class="colon">:</span></dt> +<dd class="field-odd"><p>number of rows.</p> +</dd> +<dt class="field-even">Return type<span class="colon">:</span></dt> +<dd class="field-even"><p>int</p> +</dd> +</dl> +</dd></dl> + <dl class="py method"> <dt class="sig sig-object py" id="src.Dataset.Dataset.get_sorted_column"> <span class="sig-name descname"><span class="pre">get_sorted_column</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">colname</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ascending</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">Series</span></span></span><a class="headerlink" href="#src.Dataset.Dataset.get_sorted_column" title="Permalink to this definition">¶</a></dt> @@ -422,6 +504,30 @@ catch incorrect input data types.</p> <dd><p>Tests Dataset.get_combined_anxiety_score().</p> </dd></dl> +<dl class="py function"> +<dt class="sig sig-object py" id="src.test_dataset.test_filtered_rows"> +<span class="sig-prename descclassname"><span class="pre">src.test_dataset.</span></span><span class="sig-name descname"><span class="pre">test_filtered_rows</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">the_dataset</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="#src.Dataset.Dataset" title="src.Dataset.Dataset"><span class="pre">Dataset</span></a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#src.test_dataset.test_filtered_rows" title="Permalink to this definition">¶</a></dt> +<dd><p>Tests that filtered_rows works correctly.</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="src.test_dataset.test_get_column_count"> +<span class="sig-prename descclassname"><span class="pre">src.test_dataset.</span></span><span class="sig-name descname"><span class="pre">test_get_column_count</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">the_dataset</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="#src.Dataset.Dataset" title="src.Dataset.Dataset"><span class="pre">Dataset</span></a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#src.test_dataset.test_get_column_count" title="Permalink to this definition">¶</a></dt> +<dd><p>Tests that get_column_count works correctly.</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="src.test_dataset.test_get_column_mean"> +<span class="sig-prename descclassname"><span class="pre">src.test_dataset.</span></span><span class="sig-name descname"><span class="pre">test_get_column_mean</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">the_dataset</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="#src.Dataset.Dataset" title="src.Dataset.Dataset"><span class="pre">Dataset</span></a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#src.test_dataset.test_get_column_mean" title="Permalink to this definition">¶</a></dt> +<dd><p>Tests that get_column_mean works correctly.</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="src.test_dataset.test_get_columns"> +<span class="sig-prename descclassname"><span class="pre">src.test_dataset.</span></span><span class="sig-name descname"><span class="pre">test_get_columns</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">the_dataset</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="#src.Dataset.Dataset" title="src.Dataset.Dataset"><span class="pre">Dataset</span></a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#src.test_dataset.test_get_columns" title="Permalink to this definition">¶</a></dt> +<dd><p>Tests that get_columns works correctly.</p> +</dd></dl> + <dl class="py function"> <dt class="sig sig-object py" id="src.test_dataset.test_get_dataframe"> <span class="sig-prename descclassname"><span class="pre">src.test_dataset.</span></span><span class="sig-name descname"><span class="pre">test_get_dataframe</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">the_dataset</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="#src.Dataset.Dataset" title="src.Dataset.Dataset"><span class="pre">Dataset</span></a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#src.test_dataset.test_get_dataframe" title="Permalink to this definition">¶</a></dt> @@ -434,6 +540,12 @@ catch incorrect input data types.</p> <dd><p>Tests Dataset.get_is_narcissist_col().</p> </dd></dl> +<dl class="py function"> +<dt class="sig sig-object py" id="src.test_dataset.test_get_row_count"> +<span class="sig-prename descclassname"><span class="pre">src.test_dataset.</span></span><span class="sig-name descname"><span class="pre">test_get_row_count</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">the_dataset</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="#src.Dataset.Dataset" title="src.Dataset.Dataset"><span class="pre">Dataset</span></a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#src.test_dataset.test_get_row_count" title="Permalink to this definition">¶</a></dt> +<dd><p>Tests that get_row_count works correctly.</p> +</dd></dl> + <dl class="py function"> <dt class="sig sig-object py" id="src.test_dataset.test_get_sorted_columns"> <span class="sig-prename descclassname"><span class="pre">src.test_dataset.</span></span><span class="sig-name descname"><span class="pre">test_get_sorted_columns</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">the_dataset</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="#src.Dataset.Dataset" title="src.Dataset.Dataset"><span class="pre">Dataset</span></a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#src.test_dataset.test_get_sorted_columns" title="Permalink to this definition">¶</a></dt> @@ -587,7 +699,7 @@ catch non strings.</p> <h3>Navigation</h3> -<p class="caption" role="heading"><span class="caption-text">Contents:</span></p> +<p class="caption" role="heading"><span class="caption-text">Documentation contents:</span></p> <ul class="current"> <li class="toctree-l1"><a class="reference internal" href="../genindex.html">Index</a></li> <li class="toctree-l1"><a class="reference internal" href="../search.html">Search Page</a></li> diff --git a/docs/_build/man/anxietyincomputer-gamersdifferencessimiliratiresandlearnings.1 b/docs/_build/man/anxietyincomputer-gamersdifferencessimiliratiresandlearnings.1 deleted file mode 100644 index 54f96189ea622858503eb3dc7c6f37c349f7cbcc..0000000000000000000000000000000000000000 --- a/docs/_build/man/anxietyincomputer-gamersdifferencessimiliratiresandlearnings.1 +++ /dev/null @@ -1,579 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "ANXIETYINCOMPUTER-GAMERSDIFFERENCESSIMILIRATIRESANDLEARNINGS" "1" "Jul 15, 2023" "" "Anxiety in Computer-Gamers: Differences, Similiratires and Learnings" -.SH NAME -anxietyincomputer-gamersdifferencessimiliratiresandlearnings \- Anxiety in Computer-Gamers: Differences, Similiratires and Learnings 0.1 -.sp -## Project Description -.sp -## Installation -.sp -## Usage -.sp -## Features -.sp -## Documentation -.sp -## Contributing -.sp -## Authors -.sp -## License \- Open Source Commitment and FAIR Software Development -.sp -To embrace open source development and FAIR software development principles, -we would like to encourage anyone interested in the topic to help expand on this -software library and data analysis. To help with that, we have put together a -[Contribution Guideline](CONTRIBUTION.md) as well as a -[Code of Conduct](CONDUCT.md). -.sp -## Used Dataset -.sp -The dataset can be found [here](\fI\%https://www.kaggle.com/datasets/divyansh22/online\-gaming\-anxiety\-data\fP). -.sp -## Extra -.SH SRC -.SS src package -.SS Submodules -.SS src.Dataset module -.INDENT 0.0 -.TP -.B class src.Dataset.Dataset(dataset_filename: str) -Bases: \fBobject\fP -.INDENT 7.0 -.TP -.B get_category_counts(colname: str, ascending: bool | None = None) -> Series -Returns a count of categorical values in the dataset. -.INDENT 7.0 -.TP -.B Parameters -.INDENT 7.0 -.IP \(bu 2 -\fBcolname\fP (\fIstr\fP) – the column name. -.IP \(bu 2 -\fBascending\fP (\fIbool\fP\fI, \fP\fIoptional\fP) – Direction to sort results. -If set to None, the results are not sorted. Defaults to None. -.UNINDENT -.TP -.B Returns -the counted categories. -.TP -.B Return type -pd.Series -.UNINDENT -.UNINDENT -.INDENT 7.0 -.TP -.B get_combined_anxiety_score(dataframe: DataFrame) -> Series -Get the combined anxiety score, as a column. -This score is based on the GAN, SPIN and SWL metrics. -Each of the three columns are first normalised, -then the mean is returned. -.INDENT 7.0 -.TP -.B Parameters -\fBdataframe\fP (\fIpd.DataFrame\fP) – the dataframe. -.TP -.B Raises -\fBValueError\fP – if \fIdataframe\fP is not a pd.DataFrame. -.TP -.B Returns -the anxiety score column. -.TP -.B Return type -pd.Series -.UNINDENT -.UNINDENT -.INDENT 7.0 -.TP -.B get_dataframe() -> DataFrame -A getter function for the dataframe. -.INDENT 7.0 -.TP -.B Returns -the dataset. -.TP -.B Return type -pd.DataFrame -.UNINDENT -.UNINDENT -.INDENT 7.0 -.TP -.B get_is_competitive_col(dataframe: DataFrame) -> array -Returns a column defining whether a person is competitive or not. -.INDENT 7.0 -.TP -.B Parameters -\fBdataframe\fP (\fIpd.DataFrame\fP) – the dataframe. -.TP -.B Raises -\fBValueError\fP – if \fIdataframe\fP is not a pd.DataFrame. -.TP -.B Returns -the resulting column. -.TP -.B Return type -np.array -.UNINDENT -.UNINDENT -.INDENT 7.0 -.TP -.B get_is_narcissist_col(dataframe: DataFrame) -> Series -Get a boolean narcissist column. -The Narcissism score of 1.0 is considered Not a Narcissist, -while all values above that are above are considered Narcissist. -.INDENT 7.0 -.TP -.B Parameters -\fBdataframe\fP (\fIpd.DataFrame\fP) – the dataframe -.TP -.B Raises -\fBValueError\fP – if \fIdataframe\fP is not a pd.DataFrame. -.TP -.B Returns -the boolean narcissist column. -.TP -.B Return type -pd.Series -.UNINDENT -.UNINDENT -.INDENT 7.0 -.TP -.B get_sorted_column(colname: str, ascending: bool = True) -> Series -Returns a single column, sorted either ascending or descending. -.INDENT 7.0 -.TP -.B Parameters -.INDENT 7.0 -.IP \(bu 2 -\fBcolname\fP (\fIstr\fP) – the column name (see get_dataset_columns()). -.IP \(bu 2 -\fBascending\fP (\fIbool\fP\fI, \fP\fIoptional\fP) – Sorting order. Defaults to True. -.UNINDENT -.TP -.B Returns -The sorted column. -.TP -.B Return type -pd.Series -.UNINDENT -.UNINDENT -.INDENT 7.0 -.TP -.B get_unique_column_values(colname: str) -Returns a count of categorical values in the dataset. -.INDENT 7.0 -.TP -.B Parameters -\fBcolname\fP (\fIstr\fP) – the column name. -.TP -.B Returns -an array of strings containing the unique values -present in the column -.TP -.B Return type -string array -.UNINDENT -.UNINDENT -.INDENT 7.0 -.TP -.B preprocess_dataset(raw_dataframe: DataFrame) -> DataFrame -preprocess dataframe immediately after loading it. -.INDENT 7.0 -.TP -.B Parameters -\fBraw_dataframe\fP (\fIpd.DataFrame\fP) – raw dataframe as read from pd.read_csv(). -This dataframe is discarded afterwards. -.TP -.B Raises -\fBValueError\fP – if \fIraw_dataframe\fP is not a pd.DataFrame. -.TP -.B Returns -resulting preprocessed dataframe. -.TP -.B Return type -pd.DataFrame -.UNINDENT -.UNINDENT -.INDENT 7.0 -.TP -.B preprocess_whyplay(dataframe: DataFrame) -> Series -Preprocesses the whyplay column, and returns a Is_competitive col. -.INDENT 7.0 -.TP -.B Parameters -\fBdataframe\fP (\fIpd.DataFrame\fP) – the dataframe. -.TP -.B Raises -\fBValueError\fP – if \fIdataframe\fP is not a pd.DataFrame. -.TP -.B Returns -the Is_competitive column. -.TP -.B Return type -pd.Series -.UNINDENT -.UNINDENT -.INDENT 7.0 -.TP -.B remove_nonaccepting_rows(dataframe: DataFrame) -> DataFrame -Removes rows where participants did not consent to data processing. -.INDENT 7.0 -.TP -.B Parameters -\fBdataframe\fP (\fIpd.DataFrame\fP) – the dataframe. -.TP -.B Raises -\fBValueError\fP – if \fIdataframe\fP is not a pd.DataFrame. -.TP -.B Returns -the dataframe. -.TP -.B Return type -pd.DataFrame -.UNINDENT -.UNINDENT -.INDENT 7.0 -.TP -.B treat_outliers(df: DataFrame, colname: str) -> DataFrame -Treat outliers of numerical columns. -.INDENT 7.0 -.TP -.B Parameters -.INDENT 7.0 -.IP \(bu 2 -\fBdf\fP (\fIpd.DataFrame\fP) – the dataframe. -.IP \(bu 2 -\fBcolname\fP (\fIstr\fP) – the column name to treat. -.UNINDENT -.TP -.B Returns -the filtered dataframe. -.TP -.B Return type -pd.DataFrame -.UNINDENT -.UNINDENT -.UNINDENT -.SS src.Plotter module -.INDENT 0.0 -.TP -.B class src.Plotter.Plotter(dataset: \fI\%Dataset\fP) -Bases: \fBobject\fP -.INDENT 7.0 -.TP -.B customize_plot(fig, ax, styling_params) -> None -.INDENT 7.0 -.TP -.B Parameters -.INDENT 7.0 -.IP \(bu 2 -\fBfig\fP (\fIplt.figure.Figure\fP) – -.IP \(bu 2 -\fBax\fP (\fIplt.axes.Axes\fP) – -.IP \(bu 2 -\fBstyling_params\fP (\fIdict\fP) – -.UNINDENT -.TP -.B Returns -None -.UNINDENT -.UNINDENT -.INDENT 7.0 -.TP -.B distribution_plot(target, styling_params={}) -> None -plot a distribution plot. -.INDENT 7.0 -.TP -.B Parameters -.INDENT 7.0 -.IP \(bu 2 -\fBtarget\fP (\fIstr\fP\fI, \fP\fImust be present as a column in the dataset\fP) – -.IP \(bu 2 -\fBstyling_params\fP (\fIdict\fP) – -.UNINDENT -.TP -.B Returns -None -.UNINDENT -.UNINDENT -.INDENT 7.0 -.TP -.B plot_categorical_bar_chart(category1, category2, styling_params={}) -> None -plot a categorical bar chart. -.INDENT 7.0 -.TP -.B Parameters -.INDENT 7.0 -.IP \(bu 2 -\fBcategory1\fP (\fIstr\fP\fI, \fP\fImust be present as a column in the dataset\fP) – -.IP \(bu 2 -\fBcategory2\fP (\fIstr\fP\fI, \fP\fImust be present as a column in the dataset\fP) – -.IP \(bu 2 -\fBstyling_params\fP (\fIdict\fP) – -.UNINDENT -.TP -.B Returns -None -.UNINDENT -.UNINDENT -.INDENT 7.0 -.TP -.B plot_categorical_boxplot(target, category, styling_params={}) -> None -plot a categorical boxplot. -.INDENT 7.0 -.TP -.B Parameters -.INDENT 7.0 -.IP \(bu 2 -\fBtarget\fP (\fIstr\fP\fI, \fP\fImust be present as a column in the dataset\fP) – -.IP \(bu 2 -\fBcategory\fP (\fIstr\fP\fI, \fP\fImust be present as a column in the dataset\fP) – -.IP \(bu 2 -\fBstyling_params\fP (\fIdict\fP) – -.UNINDENT -.TP -.B Returns -None -.UNINDENT -.UNINDENT -.INDENT 7.0 -.TP -.B plot_categorical_histplot(target, category, styling_params={}, bins=30) -> None -plot a categorical hisplot. -.INDENT 7.0 -.TP -.B Parameters -.INDENT 7.0 -.IP \(bu 2 -\fBtarget\fP (\fIstr\fP\fI, \fP\fImust be present as a column in the dataset\fP) – -.IP \(bu 2 -\fBcategory\fP (\fIstr\fP\fI, \fP\fImust be present as a column in the dataset\fP) – -.IP \(bu 2 -\fBstyling_params\fP (\fIdict\fP) – -.UNINDENT -.TP -.B Returns -None -.UNINDENT -.UNINDENT -.INDENT 7.0 -.TP -.B plot_scatterplot(target1, target2, styling_params={}) -> None -plot a scatterplot. -.INDENT 7.0 -.TP -.B Parameters -.INDENT 7.0 -.IP \(bu 2 -\fBtarget1\fP (\fIstr\fP\fI, \fP\fImust be present as a column in the dataset\fP) – -.IP \(bu 2 -\fBtarget2\fP (\fIstr\fP\fI, \fP\fImust be present as a column in the dataset\fP) – -.IP \(bu 2 -\fBstyling_params\fP (\fIdict\fP) – -.UNINDENT -.TP -.B Returns -None -.UNINDENT -.UNINDENT -.UNINDENT -.SS src.test_dataset module -.sp -This test file tests the Dataset class in Dataset.py. -.INDENT 0.0 -.TP -.B src.test_dataset.test_bool_or_none_params(the_dataset: \fI\%Dataset\fP, param) -Tests that functions that take bool or None correctly -work as intended. -.UNINDENT -.INDENT 0.0 -.TP -.B src.test_dataset.test_catch_colname_not_in_df(the_dataset: \fI\%Dataset\fP) -Tests that functions that take colname correctly -catch colnames not in dataset. -.UNINDENT -.INDENT 0.0 -.TP -.B src.test_dataset.test_catch_colname_not_string(the_dataset: \fI\%Dataset\fP) -Tests that functions that take colname correctly -catch colnames not in dataset. -.UNINDENT -.INDENT 0.0 -.TP -.B src.test_dataset.test_catch_non_bool(the_dataset: \fI\%Dataset\fP, param) -Tests that functions that take bool or None correctly -catch incorrect input data types. -.UNINDENT -.INDENT 0.0 -.TP -.B src.test_dataset.test_catch_non_dataframe(the_dataset: \fI\%Dataset\fP, param) -Tests that functions that take pd.DataFrame correctly -catch incorrect input data types. -.UNINDENT -.INDENT 0.0 -.TP -.B src.test_dataset.test_combined_anxiety_score(the_dataset: \fI\%Dataset\fP) -Tests Dataset.get_combined_anxiety_score(). -.UNINDENT -.INDENT 0.0 -.TP -.B src.test_dataset.test_get_dataframe(the_dataset: \fI\%Dataset\fP) -Tests Dataset.get_dataframe(). -.UNINDENT -.INDENT 0.0 -.TP -.B src.test_dataset.test_get_is_narcissist_col(the_dataset: \fI\%Dataset\fP) -Tests Dataset.get_is_narcissist_col(). -.UNINDENT -.INDENT 0.0 -.TP -.B src.test_dataset.test_get_sorted_columns(the_dataset: \fI\%Dataset\fP) -Tests Dataset.get_sorted_column(). -.UNINDENT -.INDENT 0.0 -.TP -.B src.test_dataset.test_get_unique_column_values(the_dataset: \fI\%Dataset\fP) -Tests Dataset.get_combined_anxiety_score(). -.UNINDENT -.INDENT 0.0 -.TP -.B src.test_dataset.test_incorrectly_load_Dataset_class() -Tests the Dataset init function. -.UNINDENT -.INDENT 0.0 -.TP -.B src.test_dataset.test_load_Dataset_class() -Tests if the dataset is successfully loaded. -.UNINDENT -.INDENT 0.0 -.TP -.B src.test_dataset.test_preprocessed_dataframe(the_dataset: \fI\%Dataset\fP) -Tests that the dataframe is preprocessed correctly. -.UNINDENT -.INDENT 0.0 -.TP -.B src.test_dataset.the_dataset() -> \fI\%Dataset\fP -Returns the initialised Dataset instance as a fixture. -.INDENT 7.0 -.TP -.B Returns -the initialised Dataset. -.TP -.B Return type -\fI\%Dataset\fP -.UNINDENT -.UNINDENT -.SS src.test_plotter module -.INDENT 0.0 -.TP -.B src.test_plotter.test_catch_colname_not_in_df(the_plotter: \fI\%Plotter\fP) -Tests that functions that take colname correctly -catch colnames not in dataset. -.UNINDENT -.INDENT 0.0 -.TP -.B src.test_plotter.test_catch_plotter_init_not_Dataset() -Tests that the Plotter’s init actually takes a src.Dataset.Dataset. -.UNINDENT -.INDENT 0.0 -.TP -.B src.test_plotter.test_catch_styling_params_not_dict(the_plotter: \fI\%Plotter\fP, param) -Tests that functions that take styling_params correctly -catch non dictionaries. -.UNINDENT -.INDENT 0.0 -.TP -.B src.test_plotter.test_catch_target_not_string(the_plotter: \fI\%Plotter\fP) -Tests that functions that take target correctly -catch non strings. -.UNINDENT -.INDENT 0.0 -.TP -.B src.test_plotter.test_customize_plot(the_plotter: \fI\%Plotter\fP) -Tests the customize_plot() function. -.UNINDENT -.INDENT 0.0 -.TP -.B src.test_plotter.test_distribution_plot(the_plotter: \fI\%Plotter\fP) -Tests the distribution_plot() function. -.UNINDENT -.INDENT 0.0 -.TP -.B src.test_plotter.test_load_plotter() -Tests that the Plotter class can be loaded. -.UNINDENT -.INDENT 0.0 -.TP -.B src.test_plotter.test_plot_categorical_bar_chart(the_plotter: \fI\%Plotter\fP) -Tests the plot_categorical_bar_chart() function. -.UNINDENT -.INDENT 0.0 -.TP -.B src.test_plotter.test_plot_categorical_boxplot(the_plotter: \fI\%Plotter\fP) -Tests the plot_categorical_boxplot() function. -.UNINDENT -.INDENT 0.0 -.TP -.B src.test_plotter.test_plot_categorical_histplot(the_plotter: \fI\%Plotter\fP) -Tests the plot_categorical_histplot() function. -.UNINDENT -.INDENT 0.0 -.TP -.B src.test_plotter.test_plot_scatterplot(the_plotter: \fI\%Plotter\fP) -Tests the plot_scatterplot() function. -.UNINDENT -.INDENT 0.0 -.TP -.B src.test_plotter.the_plotter() -> \fI\%Plotter\fP -Returns the initialised Plotter instance as a fixture. -.INDENT 7.0 -.TP -.B Returns -the plotter. -.TP -.B Return type -\fI\%Plotter\fP -.UNINDENT -.UNINDENT -.SS Module contents -.INDENT 0.0 -.IP \(bu 2 -\fI\%Index\fP -.IP \(bu 2 -\fI\%Search Page\fP -.IP \(bu 2 -\fI\%Module Index\fP -.UNINDENT -.SH AUTHOR -Niklas Franz, Wishyut Pitawanik, Alexander Shervud -.SH COPYRIGHT -2023, Niklas Franz, Wishyut Pitawanik, Alexander Shervud -.\" Generated by docutils manpage writer. -. diff --git a/docs/index.rst b/docs/index.rst index 44fa697af32b1b79cc082e6eeb594417ac8c13aa..f6a64bb1be4094d8759b419a86c5f816e18419e4 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -6,11 +6,13 @@ Welcome to this project's documentation! ======================================== -.. include:: ../README.md +This site contains the documentation of the functions written in this project. + +For a more detailed introduction to this project, please see the `README.md` in the top-level directory of this project. .. toctree:: :maxdepth: 2 - :caption: Contents: + :caption: Documentation contents: genindex search diff --git a/src/Dataset.py b/src/Dataset.py index ec8db0607a7274ec5b612300993ca289a4d9b0ab..5fe6a3bc63848572c6aacadac916b852908fcc4d 100644 --- a/src/Dataset.py +++ b/src/Dataset.py @@ -341,34 +341,34 @@ class Dataset: else grouped_size.sort_values(ascending=ascending) ) - def get_column_count(self) -> int: - """ - get_column_count returns the amount of columns in the dataframe. + def get_column_count(self) -> int: + """ + Returns the amount of columns in the dataframe. Returns: - int: column_count + int: number of columns. """ return len(self.dataframe.columns) - + def get_row_count(self) -> int: """ - get_rowcount returns the amount of rows in the dataframe. + Returns the amount of rows in the dataframe. Returns: - int: row_count + int: number of rows. """ return len(self.dataframe) - - def get_column_mean(self, colname:str) -> int: + + def get_column_mean(self, colname: str) -> int: """ - get_column_mean returns the mean value of all entries in one column. + Returns the mean value of all entries in one column. Args: colname (str): Index of the columns in the dataframe. - (Indexes can be get by calling get_columns()). + (Indexes can be obtained by calling get_columns()). Returns: - int: column_mean + int: mean of `colname`. """ if type(colname) != str: logging.error("parameter `colname` is not a string") @@ -376,19 +376,19 @@ class Dataset: if colname not in self.dataframe.columns: logging.error("column requested not in dataframe") raise KeyError(f"{colname} is not a column in dataframe") - + return self.dataframe[colname].mean() - + def filtered_rows(self, colname: str, criteria: str) -> pd.DataFrame: """ - filtered_rows returns a filtered dataframe + Return a filtered dataframe where `colname` == `criteria`. Args: colname (str): Column including the value you want to filter by. criteria (str): criteria that matches all the rows you want to keep Returns: - pd.DataFrame: _description_ + pd.DataFrame: the filtered dataframe. """ if type(colname) != str: logging.error("parameter `colname` is not a string") @@ -396,14 +396,14 @@ class Dataset: if colname not in self.dataframe.columns: logging.error("column requested not in dataframe") raise KeyError(f"{colname} is not a column in dataframe") - + return self.dataframe[self.dataframe[colname] == criteria] - - def get_columns(self) -> pd.Series: + + def get_columns(self) -> pd.core.indexes.base.Index: """ - get_columns returns all column headers/indexes - + Returns all column headers/indexes. + Returns: - pd.Series: List of all column headers + pd.core.indexes.base.Index: List of all column headers. """ - return self.dataframe.columns \ No newline at end of file + return self.dataframe.columns