We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e1e1d28 commit 985fab3Copy full SHA for 985fab3
sql-queries-6/run-sql-queries-on-csv-file/example_csv.py
@@ -1,4 +1,6 @@
1
-import pandas as pd from pandasql import sqldf
+import pandas as pd
2
+from pandasql import sqldf
3
+
4
# Load the CSV file into a DataFrame
5
df = pd.read_csv('data.csv')
6
@@ -14,4 +16,4 @@
14
16
# Example 2: Count individuals by gender
15
17
count_gender_query = "SELECT sex, COUNT(*) AS count FROM df GROUP BY sex"
18
count_gender = pysqldf(count_gender_query)
-print(count_gender)
19
+print(count_gender)
0 commit comments