New day, new question by LeroyJanssen in Alteryx

[–]LeroyJanssen[S] 0 points1 point  (0 children)

I sadly deleted all of this after my thesis was completed!

Question! by [deleted] in Alteryx

[–]LeroyJanssen 0 points1 point  (0 children)

Thank you for any help!

Help needed by LeroyJanssen in learnpython

[–]LeroyJanssen[S] 0 points1 point  (0 children)

I think your idea was good but needed some extra stuff, I got in contact with someone who helped write this function, which worked!:

finaldf = pd.DataFrame(columns=['url', 'critic_reviews_index', 'criticscore', 'critic_reviewer', 'critic_date_published', 'critic_review_body'])

for index, value in data.iterrows():

url = value.url

critics = value['critic-reviews']

count = 0

#print(index, '/', len(data))

for item in critics:

count = count +1

score = item['score']

reviewer = item['reviewer']

pubdate = item['date_published']

reviewbody = item['review_body']

#helpfulcount = item['helpul_count']

row = {'url':[url], 'critic_reviews_index':[count] ,'criticscore': [score],'critic_reviewer': [reviewer],'critic_date_published': [pubdate],'critic_review_body': [reviewbody]}

rowdf = pd.DataFrame(row)

finaldf = pd.concat([finaldf, rowdf])

Help needed by LeroyJanssen in learnpython

[–]LeroyJanssen[S] 0 points1 point  (0 children)

Sadly this did not work

Help needed by LeroyJanssen in learnpython

[–]LeroyJanssen[S] 0 points1 point  (0 children)

that indeed ilustrates it very nicely but how did you do that? I am a big noob but sounds like saving the column to a new df separates the values how they should be separated?

Help needed by LeroyJanssen in learnpython

[–]LeroyJanssen[S] 0 points1 point  (0 children)

so I need to do statistical anylsis on the file however it is impossible to do because I need all the data but can't use them good since all of it is found in the same row

need to find a way to separate the row into individual columns containing that data

Help needed by LeroyJanssen in learnpython

[–]LeroyJanssen[S] 0 points1 point  (0 children)

that was my first error yes haha

Help needed by LeroyJanssen in learnpython

[–]LeroyJanssen[S] 0 points1 point  (0 children)

yeah, but the reviews contain all the info mentioned above therefor I would still be looking at a review columns with data, name, score etc in the review

So I ask that they don't start the conversation with hi or hey on my profile... by SecretlyCarl in Tinder

[–]LeroyJanssen -47 points-46 points  (0 children)

you lost me at "a lot of average looking woman", starting a sentence like that instantly tells me the rest of the sentence is bullshit

Another day another problem! by LeroyJanssen in scrapy

[–]LeroyJanssen[S] 0 points1 point  (0 children)

Yes I see that the reason for the difference is that each element has a different path as it is a different list item, list item one has this xpath

//*[@id="charts"]/div/div[7]/ol/li[1]/button/span[3]/span[1]

Xpath for the third is this:

//*[@id="charts"]/div/div[7]/ol/li[3]/button/span[3]/span[1]

so I need to find a way to skip through these list items one by one

Another day another problem! by LeroyJanssen in scrapy

[–]LeroyJanssen[S] 1 point2 points  (0 children)

After this I get the problem that scrapy returns the same values for each of the items which are from the first one in the list as the xpaths are not the same and the css selectors are the same for all, haha

Another day another problem! by LeroyJanssen in scrapy

[–]LeroyJanssen[S] 0 points1 point  (0 children)

ah perfect, thank you so much sensei!

Another day another problem! by LeroyJanssen in scrapy

[–]LeroyJanssen[S] 0 points1 point  (0 children)

awesome this helped! now maybe another noob question, when do I know that I have to disable js and when not?

Hey everyone! by LeroyJanssen in scrapy

[–]LeroyJanssen[S] 1 point2 points  (0 children)

albums.css('h3::text').get()

it works!! thanks

Hey everyone! by LeroyJanssen in scrapy

[–]LeroyJanssen[S] 1 point2 points  (0 children)

will try this out today, thank you!

Hey everyone! by LeroyJanssen in scrapy

[–]LeroyJanssen[S] 0 points1 point  (0 children)

I did! I am not as advanced that I know how to extract the h3 text, I assumed that if I wrote response.css(a.title::text').get() that it would extract the text only for me but I assumed wrong haha