You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Where "subject" is <class 'bs4.element.Tag'> (subject.get_text() returns a string containing what I want to be columns "a", "b"... etc.)
And "grades" is <class 'bs4.element.ResultSet'> (behaves basically the same way a list does.)
With this code, the columns render fine and all relevant data gets to the "a" column fine, but not on "b".
a | b
1 |
2 |
3 |
4 |
If I change add_column and add_row into console.prints I get a, 1-4 from a, then b, 1-4 from b... etc
Like this:
a
1
2
3
4
b
1
2
3
4
What could I change to reach my desired output?
a | b
1 | 1
2 | 2
3 | 3
4 | 4
Note that the values (from a, b... etc) are not the same, I'm using these numbers to illustrate the order in which I get the actual data
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Here's what I currently have:
Where "subject" is
<class 'bs4.element.Tag'>
(subject.get_text()
returns a string containing what I want to be columns "a", "b"... etc.)And "grades" is
<class 'bs4.element.ResultSet'>
(behaves basically the same way a list does.)With this code, the columns render fine and all relevant data gets to the "a" column fine, but not on "b".
If I change
add_column
andadd_row
intoconsole.print
s I get a, 1-4 from a, then b, 1-4 from b... etcLike this:
What could I change to reach my desired output?
Note that the values (from a, b... etc) are not the same, I'm using these numbers to illustrate the order in which I get the actual data
Beta Was this translation helpful? Give feedback.
All reactions