Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correction for Q16 (partA) #36

Open
qsourav opened this issue Mar 15, 2024 · 0 comments
Open

Correction for Q16 (partA) #36

qsourav opened this issue Mar 15, 2024 · 0 comments

Comments

@qsourav
Copy link

qsourav commented Mar 15, 2024

  1. Append a new row 'k' to df with your choice of values for each column.
df.loc['k'] = [5.5, 'dog', 'no', 2] 

I think it would be better to add new row accoring to the columns as follows:

df.loc['k'] = ['dog', 5.5, 2, 'no',] 

Since The Data looks like:

animal age visits priority
cat 2.5 1 yes
cat 3.0 3 yes
snake 0.5 2 no
dog NaN 3 yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant