Spaces:
Sleeping
title: Mip Csv Analyser
emoji: π
colorFrom: yellow
colorTo: gray
sdk: streamlit
sdk_version: 1.25.0
app_file: app.py
pinned: false
Batch Run CSV Analyzer This script is a Streamlit application for analyzing Batch report CSV files containing scenario data. It provides functionalities to process and visualize the data, including the ability to compare data from different CSV files.
Table of Contents Overview Installation Usage Modes Functionality File Structure License Overview This script uses Streamlit, a Python library for creating interactive web applications, along with other libraries like Pandas, Matplotlib, and NumPy, to perform analysis and visualization on CSV files containing scenario data. The primary features of this script include:
Uploading and processing CSV files containing scenario data. Grouping scenarios by functional area and status (failed or passed). Displaying counts of failed and passed scenarios. Visualizing the distribution of failures by functional area using bar graphs. Calculating and displaying average time spent on each functional area. Installation Install the required Python libraries by running:
pip install pandas streamlit matplotlib numpy
Usage To run the script, navigate to the directory containing the script in your terminal and execute the following command:
streamlit run csv_analyzer.py This will open a new browser window displaying the interactive Streamlit application.
Modes The script operates in two modes: Multi mode and Compare mode.
Multi Mode In this mode, you can upload a multiple CSV file for analysis. The application will then display various statistics and visualizations related to the data in the file.
Compare Mode In this mode, you can upload two CSV files for comparison. The application will analyze and compare the data from these two files, providing insights into the differences between them.
You can switch between these modes using the buttons provided in the sidebar.
Functionality Data Processing Uploaded CSV files are preprocessed using the preprocess_uploaded_file function to handle headers and prepare the data for analysis. Scenarios are grouped based on their status (failed or passed) and functional area. Visualization The application displays counts of failed and passed scenarios. Users can select a specific status (failed or passed) to view scenarios within that category. The selected functional areas can be filtered to narrow down the display. For failed scenarios, a bar graph displays the number of failures in each functional area. Average Time Spent The average time spent on each functional area is calculated and displayed. Compare Mode In Compare mode, users can upload two CSV files for comparison. The application compares and analyzes the data from both files, highlighting any differences. File Structure app.py: The main script containing the Streamlit application code. second.py: A module providing functions for handling comparison mode. multiple.py: A module providing functions for handling multi-mode. pre.py: A module containing preprocessing functions.