Skip to content

Commit 05b4437

Browse files
committed
added a simple CSV reading script
1 parent 1ececf8 commit 05b4437

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

reading_csv.py

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import pandas as pd
2+
3+
# reading csv file into python
4+
df= pd.read_csv("c:\PROJECT\Drug_Recommendation_System\drug_recommendation_system\Drugs_Review_Datasets.csv") # Replace the path with your own file path
5+
6+
print(df)
7+
8+
# Basic functions
9+
print(df.info()) # Provides a short summary of the DataFrame
10+
print(df.head()) # prints first 5 rows
11+
print(df.tail()) # prints last 5 rows
12+
print(df.describe()) #statistical summary of numeric columns
13+
print(df.columns) # Returns column names
14+
print(df.shape) # Returns the number of rows and columnsrr
15+
16+
print(help(pd)) # Use help(pd) to explore and understand the available functions and attributes in the pandas (pd) lib

0 commit comments

Comments
 (0)