Skip to content

Commit

Permalink
WIP, Example for changing data
Browse files Browse the repository at this point in the history
  • Loading branch information
tpfau committed Oct 29, 2024
1 parent 243cd9f commit ddca570
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions content/work-with-data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,25 @@ Exercise
to understand the model.


Convert untidy data into tidy data with Pandas
----------------------------------------------
Efficient use of untidy data
----------------------------

Many data analysis tools (like Pandas) require tidy data, but some data is not in a suitable format.
What we have seen often in the past is people then not using the powerful tools, but write comple scripts that
extract individual pieces from the data each time they need to do a calculation.

Example of "questionable pipeline":
length_array = []

for entry in data:
length_array.append(len(entry['length']))
...

Check warning on line 317 in content/work-with-data.rst

View workflow job for this annotation

GitHub Actions / Build

Definition list ends without a blank line; unexpected unindent.




Example of pipeline with initial conversion to pandas e.g. via json_normalize




Expand Down

0 comments on commit ddca570

Please sign in to comment.