From 05b4437dced520c95d9a7e68538d672840f4ab91 Mon Sep 17 00:00:00 2001 From: Abhilash Date: Sat, 10 May 2025 16:37:40 +0530 Subject: [PATCH] added a simple CSV reading script --- reading_csv.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 reading_csv.py diff --git a/reading_csv.py b/reading_csv.py new file mode 100644 index 00000000000..bc8fee6334f --- /dev/null +++ b/reading_csv.py @@ -0,0 +1,16 @@ +import pandas as pd + +# reading csv file into python +df= pd.read_csv("c:\PROJECT\Drug_Recommendation_System\drug_recommendation_system\Drugs_Review_Datasets.csv") # Replace the path with your own file path + +print(df) + +# Basic functions +print(df.info()) # Provides a short summary of the DataFrame +print(df.head()) # prints first 5 rows +print(df.tail()) # prints last 5 rows +print(df.describe()) #statistical summary of numeric columns +print(df.columns) # Returns column names +print(df.shape) # Returns the number of rows and columnsrr + +print(help(pd)) # Use help(pd) to explore and understand the available functions and attributes in the pandas (pd) lib \ No newline at end of file