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: Allow timestamp and data label to be set when exporting to Stata #6553

Merged

Conversation

bashtage
Copy link
Contributor

@bashtage bashtage commented Mar 5, 2014

closes #6545

Added code which allows the time stamp and the data label to be set using
either StataWriter or to_stata. Also simplified reading these values using
StataReader by removing null bytes from the string values read.

Added basic test for both.

Also fixed one small bug where variables could be stored using Stata reserved
words.

@bashtage
Copy link
Contributor Author

bashtage commented Mar 5, 2014

Addresses the issues in #6545. Also one very small fix for variables that have name conflicts with reserved words.

@jreback
Copy link
Contributor

jreback commented Mar 5, 2014

@bashtage gr8! FYI keep in mind if you need/want to break back compat should be brought up (not that this change does, and your previous change was essentially a bug-fix)

@jreback jreback added this to the 0.14.0 milestone Mar 5, 2014
@bashtage
Copy link
Contributor Author

bashtage commented Mar 5, 2014

@jreback I am conscious that breaking backward compat is generally a bad thing that should be avoided if possible.

On the upside, I finally figured out how to rebase correctly, so that I only get 1 commit when I want only 1 commit.

BTW, is there something i did to not get a TravisCI build? It failed the first time on the 3.x versions due to a silly leading-0 issue, but I wanted to check that it all passes.

@jreback
Copy link
Contributor

jreback commented Mar 5, 2014

https://travis-ci.org/pydata/pandas

I think that you have to enable travis to access your github account to directly look on travis (e.g. then you can look up all of your builds). This is a 'default' build in that it automatically builds all PR's.

@bashtage
Copy link
Contributor Author

bashtage commented Mar 6, 2014

I don't think this fail is me... looks like random network timeout. Does it need to run until it passes? And if do, is there a way to do this would a fake commit.

@@ -294,6 +294,9 @@ Enhancements
- ``DataFrame.to_stata`` will now check data for compatibility with Stata data types
and will upcast when needed. When it isn't possibly to losslessly upcast, a warning
is raised (:issue:`6327`)
- ``DataFrame.to_stata`` and ``StataWrtiter`` will accept keyword arguments time_stamp
Copy link
Contributor

Choose a reason for hiding this comment

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

StatWriter here

@jreback
Copy link
Contributor

jreback commented Mar 6, 2014

nope...that is a random failure....minor typo other wise looks good

@jreback
Copy link
Contributor

jreback commented Mar 6, 2014

can you rebase on current master and force push....had some issue with the caching of the deps...should be resolved now

Added code which allows the time stamp and the data label to be set using
either StataWriter or to_stata.  Also simplified reading these values using
StataReader by removing null bytes from the string values read.

Added basic test for both.

Also fixed one small bug where variables could be stored using Stata reserved
words.
@bashtage
Copy link
Contributor Author

bashtage commented Mar 6, 2014

Rebased

jreback added a commit that referenced this pull request Mar 7, 2014
…_words

ENH: Allow timestamp and data label to be set when exporting to Stata
@jreback jreback merged commit 7d49037 into pandas-dev:master Mar 7, 2014
@jreback
Copy link
Contributor

jreback commented Mar 7, 2014

thanks!

@bashtage bashtage deleted the time_stamp-data_label-reserved_words branch March 13, 2014 22:24
@bashtage bashtage restored the time_stamp-data_label-reserved_words branch March 21, 2014 19:49
@bashtage bashtage deleted the time_stamp-data_label-reserved_words branch March 23, 2014 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement IO Data IO issues that don't fit into a more specific label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow timestamp option for StataWriter.write_file()
2 participants