stat157 / questionnaire

Stat 157 Questionnaire Data Wrangling
1 stars 23 forks source link

Data Analysis #34

Open xsherryxia opened 10 years ago

xsherryxia commented 10 years ago

How detailed should our data analysis be? Do we need to conduct statistical tests such as ANOVA or T-tests on our data or will explanations of what we find using histograms or other graphs suffice?

jzhang980 commented 10 years ago

Did you finish clean the data already? Do you have any clue to take out the numbers of learning style using ipython?

xsherryxia commented 10 years ago

Sorry, I just started working on it. T.T Will let you know when I get a better sense of what I'm doing! :)

carlshan commented 10 years ago

@jzhang980 & @xsherryxia: To clean the column 'What is your preferred learning style' and extract the relevant numbers, it might be useful to look at Regular Expressions within Python.

In particular, you can import the re Python library. As an example, the below code will match all numerical digits.

import re 
example = 'this an example of a text string with numbers inside, like 134 or 135'
all_numbers = re.findall('[0-9]+', example) 
print all_numbers
# ['134', '135']
xsherryxia commented 10 years ago

@carlshan Thanks for the tip!

aculich commented 10 years ago

@carlshan Thanks for providing a clear and helpful example! I edited your post to include a link directly to the Python documentation about RegExes.