Skip to content

Commit e8a770b

Browse files
committed
Lesson 09, pandas dataframes
1 parent aedcbed commit e8a770b

14 files changed

Lines changed: 14685 additions & 243 deletions

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/.quarto/
22
.DS_Store
33
lessons/data
4-
lessons/results
4+
lesons/data.zip
5+
lessons/results

css/styles.css

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ img {
177177
/* --- Styled Markdown Tables --- */
178178

179179
table {
180+
/* Ensure tables expand to the full width of the text/page column */
180181
width: 100%;
181182
border-collapse: collapse;
182183
border: 1px solid #d0d0d0; /* outer border */
@@ -187,10 +188,12 @@ table {
187188
box-shadow: 0px 2px 5px rgba(0,0,0,0.08); /* subtle lift */
188189
}
189190

191+
/* Simple: enforce left alignment for all table cell text (headers + body) */
190192
table th,
191193
table td {
192194
border: 1px solid #e5e5e5; /* internal grid lines */
193195
padding: 0.55em 0.75em;
196+
text-align: left; /* TABLE TEXT LEFT ALIGNED */
194197
}
195198

196199
table th {
@@ -208,9 +211,53 @@ table thead th {
208211
border: 1px solid #8b1628 !important; /* darker crimson border */
209212
}
210213

211-
/* Left align table captions generated by Quarto */
212-
.quarto-float-tbl .quarto-float-caption {
213-
text-align: left !important;
214+
/*
215+
Ensure table containers also stretch to the full width of the page's text column.
216+
Quarto often wraps tables in .quarto-table and/or .table-responsive, which may
217+
otherwise impose max-width constraints smaller than the page width.
218+
*/
219+
.quarto-table,
220+
.table-responsive {
221+
width: 100% !important;
222+
max-width: 100% !important;
223+
box-sizing: border-box !important;
224+
}
225+
226+
/* Table floats/captions: ensure table + caption use full content width (don't shrink to caption) */
227+
.quarto-float,
228+
.quarto-float-tbl {
229+
display: block !important;
230+
width: 100% !important;
231+
max-width: 100% !important;
232+
box-sizing: border-box !important;
233+
}
234+
235+
/*
236+
Style table captions so they:
237+
- are left aligned (as requested),
238+
- span the same width as the table,
239+
- use the same light gray background (#f5f5f5) as your outputs.
240+
*/
241+
.quarto-float .quarto-float-caption,
242+
.quarto-float-tbl .quarto-float-caption,
243+
table caption {
244+
text-align: left !important; /* TABLE CAPTIONS LEFT ALIGNED */
245+
width: 100% !important;
246+
display: block !important;
247+
box-sizing: border-box !important;
248+
margin-bottom: 0.5em;
249+
background-color: #f5f5f5; /* same gray as used elsewhere */
250+
padding: 0.4em 0.75em;
251+
}
252+
253+
/* Make sure the actual table uses the full width of its float/container */
254+
.quarto-float-tbl table,
255+
.quarto-float-tbl .quarto-table,
256+
.quarto-float table,
257+
.quarto-float .quarto-table {
258+
width: 100% !important;
259+
max-width: 100% !important;
260+
margin: 0 !important;
214261
}
215262

216263
/* Center Quarto figures and their contents */

docs/css/styles.css

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ img {
177177
/* --- Styled Markdown Tables --- */
178178

179179
table {
180+
/* Ensure tables expand to the full width of the text/page column */
180181
width: 100%;
181182
border-collapse: collapse;
182183
border: 1px solid #d0d0d0; /* outer border */
@@ -187,10 +188,12 @@ table {
187188
box-shadow: 0px 2px 5px rgba(0,0,0,0.08); /* subtle lift */
188189
}
189190

191+
/* Simple: enforce left alignment for all table cell text (headers + body) */
190192
table th,
191193
table td {
192194
border: 1px solid #e5e5e5; /* internal grid lines */
193195
padding: 0.55em 0.75em;
196+
text-align: left; /* TABLE TEXT LEFT ALIGNED */
194197
}
195198

196199
table th {
@@ -208,9 +211,53 @@ table thead th {
208211
border: 1px solid #8b1628 !important; /* darker crimson border */
209212
}
210213

211-
/* Left align table captions generated by Quarto */
212-
.quarto-float-tbl .quarto-float-caption {
213-
text-align: left !important;
214+
/*
215+
Ensure table containers also stretch to the full width of the page's text column.
216+
Quarto often wraps tables in .quarto-table and/or .table-responsive, which may
217+
otherwise impose max-width constraints smaller than the page width.
218+
*/
219+
.quarto-table,
220+
.table-responsive {
221+
width: 100% !important;
222+
max-width: 100% !important;
223+
box-sizing: border-box !important;
224+
}
225+
226+
/* Table floats/captions: ensure table + caption use full content width (don't shrink to caption) */
227+
.quarto-float,
228+
.quarto-float-tbl {
229+
display: block !important;
230+
width: 100% !important;
231+
max-width: 100% !important;
232+
box-sizing: border-box !important;
233+
}
234+
235+
/*
236+
Style table captions so they:
237+
- are left aligned (as requested),
238+
- span the same width as the table,
239+
- use the same light gray background (#f5f5f5) as your outputs.
240+
*/
241+
.quarto-float .quarto-float-caption,
242+
.quarto-float-tbl .quarto-float-caption,
243+
table caption {
244+
text-align: left !important; /* TABLE CAPTIONS LEFT ALIGNED */
245+
width: 100% !important;
246+
display: block !important;
247+
box-sizing: border-box !important;
248+
margin-bottom: 0.5em;
249+
background-color: #f5f5f5; /* same gray as used elsewhere */
250+
padding: 0.4em 0.75em;
251+
}
252+
253+
/* Make sure the actual table uses the full width of its float/container */
254+
.quarto-float-tbl table,
255+
.quarto-float-tbl .quarto-table,
256+
.quarto-float table,
257+
.quarto-float .quarto-table {
258+
width: 100% !important;
259+
max-width: 100% !important;
260+
margin: 0 !important;
214261
}
215262

216263
/* Center Quarto figures and their contents */

0 commit comments

Comments
 (0)