This will include my codes on my quest to be better at data prepping. It will also include the codes for the Weekly Data Prepping Challenge.
- Challenge years: 2022 | 2021
Python Functions
PostgreSQL
Category | Function/Method/Concept | Weeks Used |
Other |
list methods ( |
2021: W27 W29 W34 W35 2022: W09 |
dict comprehension |
2021: W10 2022: W08 W19 | |
|
2021: W01 W13 W14 W29 2022: W05 W08 W19 W20 | |
user input |
2022: W13 W31 | |
|
2021: W10 W11 W24 2022: W08 W10 W19 | |
Pandas - Aggregation |
Named Aggregation |
2021: W03 W04 W06 W07 W08 W10 W21 W22 W23 W28 W33 2022: W03 W04 W06 W09 |
|
2021: W06 W08 W13 W16 2022: W06 W14 W22 W24 W26 W31 | |
|
2021: W23 2022: W06 | |
|
2021: W09 W20 W21 W35 W34 W36 2022: W02 W08 W12 W14 W17 W26 W28 W29 W31 W32 | |
Pandas - Dates |
Dateparts ( |
2021:
W01
W02
W15 W29 W32 2022: W01 W02 W09 W15 |
|
2021: W24 W37 W41 2022: W28 W32 | |
|
2022: W02 | |
|
2021: W16 W20 W31 2022: W01 W02 W15 W27 | |
|
2021: W18 W26 W33 2022: W15 | |
|
2021: W01 W02 W03 W12 W29 W30 W33 2022: W02 W07 W09 W18 | |
working with timezones (tz_localize, etc.) | 2022: W17 | |
Pandas - File I/O |
With ExcelFiles (dynamic sheets) |
2021: W02 W04 W07 W08 W15 W17 W18 W19 W22 W23 W24 W33 2022: W07 W21 |
Pandas - Joining |
|
2021: W41 |
|
2021: W12 W13 W23 W26 W33 2022: W07 W12 W20 W23 W30 | |
|
2021: W06 W09 W10 W14 W17 W18 W22 W24 W26 W27 W29 W34 W35 W36 2022: W03 W07 W08 W15 W16 W18 W19 W20 W24 W29 | |
|
2021: W02 W06 W09 W11 W12 W14 W15 W20 W23 W34 | |
|
2021: W08 2022: W22 W33 | |
Pandas - Other |
|
2021: W10 W12 W16 W35 W36 2022: W02 W06 |
|
2021: 2022: W01 W03 W12 W22 W23 W30 W33 | |
|
2021: W23 2022: W05 | |
|
2021: | |
|
2021: W39 2022: W11 W16 W21 | |
|
2022: W01 | |
|
2021: W08 W41 2022: | |
|
2021: W04 W05 W14 W15 W26 W27 W30 W38 W41 2022: W08 W10 W13 W16 W22 W31 W33 | |
Pandas - Reshaping |
|
2021: W31 W40 |
|
2021: W07 W09 W22 W24 W26 2022: W06 W22 W32 | |
|
2021: W02 W09 W11 W19 W22 W29 2022: W07 W10 W12 W18 W20 W30 | |
|
2021: W03 W04 W12 W14 W15 W16 W17 W27 W28 W29 W34 2022: W03 W04 W05 W16 W18 W21 W29 | |
|
2021: W15 W18 W23 W36 2022: W15 W26 | |
|
2021: W07 | |
Pandas - Selection/slicing |
|
2021: W09 W10 W12 W14 W17 W22 W29 2022: W03 W08 W10 W14 |
|
2021: W05 W09 W10 W28 2022: W08 W10 W19 W22 W28 W29 | |
|
2021: W08 W16 2022: W08 W14 W18 | |
|
2021: W30 W36 | |
|
2022: W22 | |
String Functions |
Changing case ( |
2021: W07 W19 W22 W41 2022: W06 W29 |
|
2021: W09 W10 W16 W22 2022: W14 W23 | |
|
2021: W12 2022: | |
|
2021: W02 W14 W28 W34 2022: W04 W06 W07 W15 W17 W18 W19 | |
numpy |
|
2021: |
|
2021: W07 W08 W14 2022: W20 | |
|
2021:
W14
W15
W16
W33
W34
W39
W41
2022:
W01
W02
W04
W07
W08
W09
W17
W19
|
Category | Function/Method/Concept | Weeks Used |
Querying Data |
Column aliases |
2021: W1 2022: |
Select Distinct |
2021: 2022: | |
Filtering Data |
Limit |
2021: 2022: |
Fetch |
2021: 2022: | |
In / Between / Like / Is Null |
2021: W13 2022: | |
Joining Multiple Tables |
Joins ( |
2021: W4 W14 2022: W24 |
Other Joins( |
2021: W14 2022: | |
Grouping Data |
Group By |
2021: W5 2022: |
Having |
2021: 2022: | |
Set Operation |
Union |
2021: W3 W4 2022: |
Intersect |
2021: 2022: | |
Except |
2021: 2022: | |
Grouping sets, Cube, and Rollup |
Grouping Sets |
2021: 2022: |
Cube |
2021: 2022: | |
Rollup |
2021: 2022: | |
Subquery |
ANY |
2021: 2022: |
ALL |
2021: 2022: | |
EXISTS |
2021: 2022: | |
Common Table Expressions (CTE) |
CTE |
2021: W1 W4 W6 W14 2022: W24 |
Modifying Data |
Insert multiple rows |
2021: 2022: |
Update |
2021: 2022: | |
Update Join |
2021: 2022: | |
Delete |
2021: 2022: | |
Managing Tables |
Select into and Create table as |
2021: W14 |
ALTER |
2021: 2022: | |
ARRAY |
2021: W3 W6 2022: | |
Change column data type |
2021: 2022: | |
DATE |
2021: W2 W3 W4 2022: | |
Truncate table |
2021: 2022: | |
Conditional Expressions & Operators |
CASE |
2021: W1 W6 W13 W14 2022: |
COALESCE |
2021: 2022: | |
CAST |
2021: W14 2022: | |
String Function |
CONCAT |
2021: 2022: |
LEFT / RIGHT |
2021: W1 2022: | |
TO_NUMBER |
2021: W6 2022: | |
REGEXP |
2021: W6 W14 2022: W24 | |
SPLIT_PART |
2021: W2 W3 2022: | |
SUBSTRING |
2021: W2 W14 2022: W24 |