Greatwoman23 / My-Select-Query

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Welcome to My Select Query


Task

The code is designed to perform a query on a CSV file containing NBA player data. It defines a class called MySelectQuery that allows you to filter the data based on specific criteria. When you create an instance of the MySelectQuery class, you provide the CSV data as a string. The constructor of the class processes this data and stores it in a format that can be easily queried later. The where method is the key part of the class. It takes two arguments: the column name and the value to filter by. It searches through the stored data and returns a result that matches the provided criteria. The task is to create a class in my select query.

Description

I solved the problem by using the example given (csv content as string). I will Implement a where method which will take 2 arguments: column_name and value. It will return an array of strings which matches the value. the examples(csv content) include the following; Nba Player Data Nba Players Nba Seasons Stats In the given example, the CSV data represents NBA player information such as their name, years played, position, height, weight, birth date, and college. The where method is called with the column name "name" and the value "Andre Brown". It then looks for any players with the name "Andre Brown" and returns a result that matches the criteria.

Installation

There was no major installation.

Usage

By running this code, you will get a formatted table as output, showing the player informations.

Open a terminal or command prompt and navigate to the directory where you saved the Python file.
 Use the following command to run the code:
./python my_select_query.py

The Core Team

Made at Qwasar SV -- Software Engineering School <img alt='Qwasar SV -- Software Engineering School's Logo' src='https://storage.googleapis.com/qwasar-public/qwasar-logo_50x50.png' width='20px'>

About


Languages

Language:Python 100.0%