Skip to content

Commit 6a94e35

Browse files
joaoguilhermeScwhansekandersolar
authored
Removing the 'closed' kwarg from pd.date_range in gallery examples (#1540)
* removing closed parameter from pandas daframes * Update v0.9.3.rst * Apply suggestions from code review * Update docs/examples/solar-tracking/plot_single_axis_tracking_on_sloped_terrain.py * Apply suggestions from code review Co-authored-by: Cliff Hansen <[email protected]> Co-authored-by: Kevin Anderson <[email protected]>
1 parent 6ffe257 commit 6a94e35

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

docs/examples/solar-position/plot_sunpath_diagrams.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
tz = 'Asia/Calcutta'
2525
lat, lon = 28.6, 77.2
2626

27-
times = pd.date_range('2019-01-01 00:00:00', '2020-01-01', closed='left',
28-
freq='H', tz=tz)
27+
times = pd.date_range('2019-01-01 00:00:00', '2020-01-01', freq='H', tz=tz)
2928
solpos = solarposition.get_solarposition(times, lat, lon)
3029
# remove nighttime
3130
solpos = solpos.loc[solpos['apparent_elevation'] > 0, :]

docs/examples/solar-tracking/plot_single_axis_tracking.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
tz = 'US/Eastern'
2828
lat, lon = 40, -80
2929

30-
times = pd.date_range('2019-01-01', '2019-01-02', closed='left', freq='5min',
30+
times = pd.date_range('2019-01-01', '2019-01-02', freq='5min',
3131
tz=tz)
3232
solpos = solarposition.get_solarposition(times, lat, lon)
3333

docs/examples/solar-tracking/plot_single_axis_tracking_on_sloped_terrain.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@
9191
gcr = 0.4
9292

9393
# calculate the solar position
94-
times = pd.date_range('2019-01-01 06:00', '2019-01-01 18:00', closed='left',
95-
freq='1min', tz=tz)
94+
times = pd.date_range('2019-01-01 06:00', '2019-01-01 18:00', freq='1min',
95+
tz=tz)
9696
solpos = solarposition.get_solarposition(times, lat, lon)
9797

9898
# compare the backtracking angle at various terrain slopes

docs/sphinx/source/whatsnew/v0.9.3.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ v0.9.3 (TBD)
55

66
Deprecations
77
~~~~~~~~~~~~
8-
8+
* Removed the kwarg ``closed`` from ``pd.date_range`` in the examples since it is deprecated for pandas >= 1.4.0. (:pull:`1540`)
99

1010
Enhancements
1111
~~~~~~~~~~~~
@@ -33,4 +33,4 @@ Requirements
3333

3434
Contributors
3535
~~~~~~~~~~~~
36-
36+
João Guilherme (:ghuser:`joaoguilhermeS`)

0 commit comments

Comments
 (0)