.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "tabular/auto_checks/data_integrity/plot_special_chars.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_tabular_auto_checks_data_integrity_plot_special_chars.py: .. _tabular__special_chars: Special Characters ****************** This notebook provides an overview for using and understanding the Special Characters check. **Structure:** * `What is the Special Characters check <#what-is-special-characters>`__ * `Generate data <#generate-data>`__ * `Run the check <#run-the-check>`__ .. GENERATED FROM PYTHON SOURCE LINES 18-21 What is the Special Characters check ====================================== The ``SpecialCharacters`` check search in column[s] for values that contains only special characters. .. GENERATED FROM PYTHON SOURCE LINES 24-29 .. code-block:: default import pandas as pd from deepchecks.tabular.checks import SpecialCharacters .. GENERATED FROM PYTHON SOURCE LINES 30-32 Generate Data ============== .. GENERATED FROM PYTHON SOURCE LINES 32-50 .. code-block:: default data = {'col1': [' ', '!', '"', '#', '$', '%', '&', '\'','(', ')', '*', '+', ',', '-', '.', '/', ':', ';', '<', '=', '>', '?', '@', '[', ']', '\\', '^', '_', '`', '{', '}', '|', '~', '\n'], 'col2':['v', 'v', 'v', 'v4', 'v5', 'v6', 'v7', 'v8','v9','v10', '*', '+', ',', '-', '.', '/', ':', ';', '<', '=', '>', '?', '@', '[', ']', '\\', '^', '_', '`', '{', '}', '|', '~', '\n'], 'col3': [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,11,1,'???#',1,1,1,1,1,1,1,1,1,1,1], 'col4': [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,11,1,1,1,1,1,1,1,1,1,1,1,1,1], 'col5': ['valid1','valid2','valid3','valid4','valid5','valid6','valid7', 'valid8','valid9','valid10','valid11','valid12', 'valid13','valid14','inval!d15','valid16','valid17','valid18', 'valid19','valid20','valid21','valid22','valid23','valid24','valid25', 'valid26', 'valid27','valid28','valid29','valid30','valid31','32','33','34']} dataframe = pd.DataFrame(data=data) .. GENERATED FROM PYTHON SOURCE LINES 51-53 Run the check =============== .. GENERATED FROM PYTHON SOURCE LINES 53-54 .. code-block:: default SpecialCharacters().run(dataframe) .. raw:: html
Special Characters


.. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.026 seconds) .. _sphx_glr_download_tabular_auto_checks_data_integrity_plot_special_chars.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_special_chars.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_special_chars.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_