Skip to main content

A Python package for statistical and EDA analysis

Project description

CNAnalysis

CNAnalysis is a Python package for comprehensive statistical and exploratory data analysis (EDA). It provides tools for performing ANOVA, Chi-square tests, correlation matrices, outlier handling, encoding categorical features, and visualizing distributions.

📦 Installation

pip install cnanalysis

📚 Modules Overview

  1. AnovaTest – One-Way ANOVA
    from cnanalysis import AnovaTest
    anova = AnovaTest(data=df, num_col='score',cat_col='group')
    result = anova.test()
    print(result)
    
  2. ChiSquareTest – Chi-Square Test with Cramér’s V
    from cnanalysis import ChiSquareTest
    chi_test = ChiSquareTest(data=df, col1='gender', col2='purchase')
    result = chi_test.test()
    print(result)
    
  3. CombineAnalysis – Grouped Bar Plots with Stats
    from cnanalysis import CombineAnalysis
    
    plotter = CombineAnalysis(data=df, number_col='sales', categorical_col='region')
    summary_df = plotter.PlotGroupedData()
    
  4. CorrelationMat – Correlation Matrix Plot
    from cnanalysis import CorrelationMat
    
    corr = CorrelationMat(data=df)
    corr.plotCM()`
    
  5. DescriptiveSAT – Descriptive Statistics + Outlier Count
    from cnanalysis import DescriptiveSAT
    
    desc = DescriptiveSAT(data=df)
    stats = desc.get_descriptive_statistics(columns=['height', 'weight'])
    print(stats)
    
  6. DistributionOutViz – Histogram + Boxplot for Outlier
    from cnanalysis import DistributionOutViz
    
    dist_viz = DistributionOutViz(data=df, num_cols=['price','income'])
    dist_viz.PlotDAO()
    
  7. EncodeCat – Label, One-Hot, and Ordinal Encoding
    from cnanalysis import EncodeCat
    
    encoder = EncodeCat(data=df, method='label')
    encoded_df = encoder.encode()
    
  8. HandleOutlier – Winsorization (Cap Outliers)
    from cnanalysis import HandleOutlier
    
    out = HandleOutlier(data=df, lower=0.05, upper=0.95)
    winsorized_df = out.winsorize()
    
  9. CardinalityAndRareCategoryAnalyzer – Rare Category
    from cnanalysis import CardinalityAndRareCategoryAnalyzer
    
    analyzer = CardinalityAndRareCategoryAnalyzer(data=df, thresh=0.01)
    report = analyzer.get_cardinality_n_rare_cat()
    print(report)
    

🧑‍💻 Author

Roshan Kumar
🎓 Student, B.Sc. in Computer Science and Data Analytics (CSDA)
🏫 Indian Institute of Technology Patna (IITP)
📧 rk1861303@gmail.com

📝 License

This project is licensed under the MIT License – see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cnanalysis-0.1.0.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cnanalysis-0.1.0-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file cnanalysis-0.1.0.tar.gz.

File metadata

  • Download URL: cnanalysis-0.1.0.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for cnanalysis-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2a63ca273d7f2e6b4d8645d256eef91229b40e479fedef97cf1e7ae499f96ac3
MD5 60327c55cdaa66cfc4237ddb817181f4
BLAKE2b-256 f90d6a995215553a35133c7f65f7988a5d7dee3787bcc6cda45fe8bd74d1b823

See more details on using hashes here.

File details

Details for the file cnanalysis-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cnanalysis-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for cnanalysis-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cba0fa5a54ac855d07d44a4cc49ebc7736b176bb199cff676190173a58bc8fd0
MD5 f293c10baeff765013ef79a469bf5438
BLAKE2b-256 ce8b83b6fbb140d4c34981a554f3ea96c385c343871d9b1ecae12fc6486ff02b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page