This project is a simple yet powerful tool for counting the frequency of values in each column of a CSV file using the Pandas library. Users can interactively view the frequency counts of any column by either its name or index.
- Load and analyze CSV files with tab-delimited columns.
- Interactive command-line interface to view frequency counts of any column.
- Toggle column names visibility for easier navigation.
- Clear the screen for a clean and clutter-free display.
Before you begin, ensure you have the following installed:
- Python 3.x
- pandas library
- A CSV file named
sampledata.csv
with tab-delimited columns
-
Clone the repository:
git clone https://github.com/rqueztech/PandasFrequencyCounter.git cd PandasFrequencyCounter
-
Install the required Python packages:
pip install pandas
-
Ensure your CSV file is named
sampledata.csv
and is placed in the same directory as the script.
Run the script using Python:
python frequency_counter.py
Here's a brief example of how to use the tool:
-
When you run the script, you'll be prompted to enter the column name or index you want to see the frequency count of.
Enter the column name or index you want to see the frequency count of (or 'toggle' to toggle column names):
-
If you enter a column index or name, the frequency count of that column will be displayed.
1 Column1 2 Column2 3 Column3 4 Column4 5 Column5 Enter the column name or index you want to see the frequency count of (or 'toggle' to toggle column names):
-
To toggle the display of column names, type
toggle
. -
To clear the screen, type
clear
. -
Press Enter after viewing the frequency count to continue.
Contributions are welcome! If you have suggestions for improvements or find any bugs, please open an issue or submit a pull request.
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.
This project is licensed under the MIT License.