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

ENH: add more possible bool values to read_csv #1295 #1691

Closed
wants to merge 1 commit into from

Conversation

moleary
Copy link
Contributor

@moleary moleary commented Jul 27, 2012

Added more possible bool values when parsing a file. New values include upper and lower case True/False and Yes/No.

@wesm
Copy link
Member

wesm commented Sep 8, 2012

Could you please add a unit test?

@@ -654,9 +654,11 @@ def maybe_convert_bool(ndarray[object] arr):
for i from 0 <= i < n:
val = arr[i]

if val == 'True' or type(val) == bool and val:
true_vals = ('True', 'TRUE', 'true', 'Yes', 'YES', 'yes')
false_vals = ('False', 'FALSE', 'false', 'No', 'NO', 'no')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for future Python endeavors, I wouldn't recommend putting constant variables like these inside the for loop (very inefficient)

wesm added a commit that referenced this pull request Sep 12, 2012
@wesm
Copy link
Member

wesm commented Sep 12, 2012

I merged this in. Hopeful it won't cause big problems

@wesm wesm closed this Sep 12, 2012
@moleary
Copy link
Contributor Author

moleary commented Sep 13, 2012

Woops, sorry, didn't realize I was doing that, will be more careful next
time.

On Wed, Sep 12, 2012 at 11:04 AM, Wes McKinney notifications@git.luolix.topwrote:

I merged this in. Hopeful it won't cause big problems


Reply to this email directly or view it on GitHubhttps://github.com//pull/1691#issuecomment-8496784.

yarikoptic added a commit to neurodebian/pandas that referenced this pull request Sep 27, 2012
* commit 'v0.8.1-203-g67121af': (193 commits)
  BUG: DataFrame column formatting issue in length-truncated column close pandas-dev#1906
  BUG: override min/max in DatetimeIndex to function as expected close pandas-dev#1895
  BUG: DataFrame mixed-type arithmetic column-wise, fix DataFrame.diff upcasting->object bug close pandas-dev#1896
  BUG: treat nobs=1 >= min_periods case in rolling_std/variance as 0 trivially. close pandas-dev#1884
  TST: skip to_file test if URLError occurs on some systems
  VB: resolve test name conflict and update make script
  DOC: minor change to build script to help auto build process
  DOC: fixed extlinks in sphinx conf
  TST: oops import in wrong place
  TST: skip test_console_encode if sys.stdin.encoding is None
  TST: unit test for pandas-dev#1902 and default to csv.QUOTE_MINIMAL
  Make it possible to set quoting for to_csv
  ENH: clean up pandas-dev#1691 changes, rls note
  ENH: add more possible bool values to read_csv pandas-dev#1295
  BUG: fix rolling_max/min for small inputs and large windows. Add a check that the min_period <= window size. Fixes pandas-dev#1897.
  Mention Ubuntu for NeuroDebian repository
  BUG: don't clobber color keyword in Series.plot, close pandas-dev#1890
  DOC: add intersphinx mapping for python library, close pandas-dev#1556
  BUG: fix mixed-integer .ix indexing bugs. close#1799
  BUG: unicode sheet name in to_excel pandas-dev#1828
  ...
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

Successfully merging this pull request may close these issues.

3 participants