What is difference between scatter, line, histogram and barcharts?
What is difference between scatter, line, histogram and barcharts? SOLUTION…. Property Scatter Line Histogram Bar Chart X-axis Type Numeric Numeric/Time Numeric Bins Categorical Y-axis Type Numeric Numeric Frequency Numeric Use Case Relationship between 2 variables Trend over time Distribution of values Comparison between categories Bars/Points Points Connected Line Touching Bars Separate Bars
What is Central Tendency measures? Describe mean, median, mode, variance, Standard Deviation.
What is Central Tendency measures? Describe mean, median, mode, variance, Standard Deviation. SOLUTION…. 1. Mean Definition: The arithmetic average of all values in a dataset. Python Example: import statistics data = [10, 15, 20, 20, 25, 30, 35] mean_value = statistics.mean(data) print(“Mean:”, mean_value) # Output: 22.142857142857142 2. Median Definition: The middle value when the data […]
Explain Select, Insert, update, delete using execute() method to interact with SQLite table.
Explain Select, Insert, update, delete using execute() method to interact with SQLite table. SOLUTION…. 1. SELECT – Retrieve data from a table. import sqlite3 conn = sqlite3.connect(‘example.db’) cursor = conn.cursor() cursor.execute(“SELECT * FROM students”) # Retrieve all rows rows = cursor.fetchall() # Fetch all results for row in rows: print(row) conn.close() 2. INSERT – Add […]
PYTHON VIVA
PYTHON VIVA Class 10th Variable – What is a variable in Python?Answer: A named memory location to store data. Loop – What is a loop?Answer: A block of code that repeats multiple times. Tuple – What is a tuple?Answer: An ordered, unchangeable collection of items. String – What is a string?Answer: A sequence of characters […]
PYTHON VIVA
PYTHON VIVA CLASS 9th Variable – What is a variable in Python?Answer: A named memory location to store data. String – What is a string?Answer: A sequence of characters enclosed in quotes. Integer – What is an integer?Answer: A whole number without a decimal. Float – What is a float?Answer: A number with a decimal […]
Explain Dataframe functions with example: head, tail , loc, iloc, value and to_numpy().
Explain Dataframe functions with example: head, tail , loc, iloc, value and to_numpy(). SOLUTION…. DataFrame methods: head, tail, loc, iloc, values and to_numpy() — explained with examples Below is a short, original, and practical explanation of each method/attribute plus examples you can try in Python with pandas. 1) head(n=5) What it does: returns the first […]
Explain extract and write commands for csv and excel files using Dataframe.
Explain extract and write commands for csv and excel files using Dataframe. SOLUTION…. Pandas is a powerful Python library used for data manipulation and analysis. One of its most useful features is handling structured data stored in CSV (Comma-Separated Values) and Excel files. Pandas provides built-in methods to easily read (extract) and write (save) these […]
How to Set PYTHONPATH? Explain Concepts of Namespace, Scope and Packages in python.
How to Set PYTHONPATH? Explain Concepts of Namespace, Scope and Packages in python. SOLUTION…. Set PYTHONPATH PYTHONPATH is an environment variable that Python uses to add extra directories to sys.path so modules/packages in those directories can be imported. Quick check (see what Python currently searches): Temporarily (current shell session) Linux / macOS (bash / zsh): […]
How to import a CSV file into a table and Export a CSV file into a table ? Give appropriate example.
How to import a CSV file into a table and Export a CSV file into a table ? Give appropriate example. SOLUTION…. 1) MySQL / MariaDB Example table & sample CSV Table schema: CREATE TABLE employees ( id INT, name VARCHAR(100), dept VARCHAR(50), hire_date DATE, salary DECIMAL(10,2) ); Sample CSV (employees.csv): Import CSV into table […]
Explain how to Dump specific table into file and Dump only table structure providing appropriate example.
Explain how to Dump specific table into file and Dump only table structure providing appropriate example. SOLUTION…. Dumping Specific Table into a File When working with databases like MySQL, you may not always want to back up the entire database. Sometimes you only need to export (dump) a single table’s data. This can be done […]