Data Science

Extract insights from data.

Machine Learning

Automatize workflows with ML models.

Data Applications

Use insights and ML models to build aplications.

TensorFlow js

TensorFlow js is an end-to-end open-source platform for machine learning in web browser.

bar post

Keep Last Date OAC Data Flow

Kown how to deal with duplicate data keeping only last row by date.

Initial State

ID Place Date Value
0 Temuco 10/10/2020 3
1 Temuco 10/11/2020 2
2 Temuco 10/12/2020 7
3 Maldiva 10/09/2020 2
4 Sucenaga 10/09/2020 12
5 Cairo 10/09/2020 26
6 Maldiva 10/10/2020 6

Desired State

ID Place Date Value
2 Temuco 12/10/2020 7
4 Sucenaga 09/10/2020 12
5 Cairo 09/10/2020 26
6 Maldiva 10/10/2020 6

0. Load data frame with initial state

2. Search for max date by place

MAX(Date by Place)

3. Create a Boolean to track last date

CASE WHEN Date = LastDate THEN 1 ELSE 0 END

4. Apply Boolean filter to keep last equal 1

4. Remove transition columns

5. Save desired state