Skip to content

Commit db0b8d1

Browse files
authored
Update python-plot-histogram.md
the module alias "plt" didn't match on line 85.
1 parent 0c0edf8 commit db0b8d1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/machine-learning/data-exploration/python-plot-histogram.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ password = 'databasename'
8282
cnxn = pyodbc.connect('DRIVER={SQL Server};SERVER='+server+';DATABASE='+database+';UID='+username+';PWD='+ password)
8383
cursor = cnxn.cursor()
8484
sql = "SELECT DATEDIFF(year, c.BirthDate, GETDATE()) AS Age FROM [dbo].[FactInternetSales] s INNER JOIN dbo.DimCustomer c ON s.CustomerKey = c.CustomerKey"
85-
df = pd.read_sql(sql, cnxn)
85+
df = plt.read_sql(sql, cnxn)
8686
df.hist(bins=10)
8787
```
8888

8989
The display shows the age distribution of customers in the FactInternetSales table.
9090

91-
![Pandas Histogram](./media/python-histogram.png)
91+
![Pandas Histogram](./media/python-histogram.png)

0 commit comments

Comments
 (0)