Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs1-25sp
project04
Commits
0ae78e1e
Commit
0ae78e1e
authored
3 months ago
by
Jinhuang (Jin) Zhou
Browse files
Options
Download
Email Patches
Plain Diff
bad import
parent
b214980b
master
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/pds_helper.py
+2
-0
src/pds_helper.py
src/special_cradles.py
+0
-3
src/special_cradles.py
with
2 additions
and
3 deletions
+2
-3
src/pds_helper.py
View file @
0ae78e1e
...
...
@@ -20,6 +20,7 @@ def extract_and_convert(relative_filepath:str)-> list[dict[str, Any]]:
# TODO 0: Fix the bad representation
...
# Provided
def
write_to_csv
(
pend_list
):
"""
...
...
@@ -32,6 +33,7 @@ def write_to_csv(pend_list):
df
=
pd
.
DataFrame
.
from_dict
(
pend_list
)
df
.
to_csv
(
NC_FP
,
index
=
False
)
# Provided
if
__name__
==
"__main__"
:
print
(
pd
.
read_csv
(
NC_FP
))
...
...
This diff is collapsed.
Click to expand it.
src/special_cradles.py
View file @
0ae78e1e
...
...
@@ -7,9 +7,6 @@ from support.pendulum import make_objects_of_pendulum
from
support.constants
import
*
from
src.pds_helper
import
extract_and_convert
import
pandas
as
pd
# TODO 1: write the following 5 functions using relevant helper functions from 'pds_helper'.
def
uniform_mass_newton_cradle
(
relative_filepath
:
str
,
mass
:
float
):
"""
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help