{"action":"created","issue":{"url":"https://api.github.com/repos/daffidwilde/edo/issues/48","repository_url":"https://api.github.com/repos/daffidwilde/edo","labels_url":"https://api.github.com/repos/daffidwilde/edo/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/daffidwilde/edo/issues/48/comments","events_url":"https://api.github.com/repos/daffidwilde/edo/issues/48/events","html_url":"https://github.com/daffidwilde/edo/issues/48","id":355262689,"node_id":"MDU6SXNzdWUzNTUyNjI2ODk=","number":48,"title":"Conserving datatypes of columns","user":{"login":"daffidwilde","id":26261131,"node_id":"MDQ6VXNlcjI2MjYxMTMx","avatar_url":"https://avatars3.githubusercontent.com/u/26261131?v=4","gravatar_id":"","url":"https://api.github.com/users/daffidwilde","html_url":"https://github.com/daffidwilde","followers_url":"https://api.github.com/users/daffidwilde/followers","following_url":"https://api.github.com/users/daffidwilde/following{/other_user}","gists_url":"https://api.github.com/users/daffidwilde/gists{/gist_id}","starred_url":"https://api.github.com/users/daffidwilde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daffidwilde/subscriptions","organizations_url":"https://api.github.com/users/daffidwilde/orgs","repos_url":"https://api.github.com/users/daffidwilde/repos","events_url":"https://api.github.com/users/daffidwilde/events{/privacy}","received_events_url":"https://api.github.com/users/daffidwilde/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-29T17:37:01Z","updated_at":"2018-08-29T18:54:08Z","closed_at":null,"author_association":"OWNER","body":"## The issue\r\n\r\nNot a huge issue but it would be nice to preserve datatypes during crossover. That way, analysis of the data can be done more easily after running.\r\n\r\n## Example\r\n\r\nThe issue arises when an `NaN` is introduced to a column with integer datatype. For instance:\r\n\r\n``` python\r\n\r\n>>> import numpy as np\r\n>>> from edo.individual import create_individual\r\n>>> from edo.pdfs import Poisson\r\n\r\n>>> np.random.seed(0)\r\n\r\n>>> df, meta = create_individual(row_limits=[10, 10], col_limits=[1, 1], pdfs=[Poisson])\r\n\r\n>>> print(df.dtypes)\r\n0    int64\r\ndtype: object\r\n\r\n>>> print(df)\r\n   0\r\n0  2\r\n1  2\r\n2  4\r\n3  2\r\n4  0\r\n5  0\r\n6  5\r\n7  1\r\n8  1\r\n9  2\r\n\r\n>>> df.iloc[3:5, 0] = np.nan\r\n\r\n>>> print(df.dtypes)\r\n0    float64\r\ndtype: object\r\n\r\n>>> print(df)\r\n     0\r\n0  2.0\r\n1  2.0\r\n2  4.0\r\n3  NaN\r\n4  NaN\r\n5  0.0\r\n6  5.0\r\n7  1.0\r\n8  1.0\r\n9  2.0\r\n```\r\n\r\n## Potential solutions\r\n\r\n1. All values from categorical distributions are returned as strings.\r\n2. Work out the \"add-on\" part of the dataframe separately (maybe even columns separately as well) and then append it."},"comment":{"url":"https://api.github.com/repos/daffidwilde/edo/issues/comments/417065583","html_url":"https://github.com/daffidwilde/edo/issues/48#issuecomment-417065583","issue_url":"https://api.github.com/repos/daffidwilde/edo/issues/48","id":417065583,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNzA2NTU4Mw==","user":{"login":"drvinceknight","id":2131546,"node_id":"MDQ6VXNlcjIxMzE1NDY=","avatar_url":"https://avatars2.githubusercontent.com/u/2131546?v=4","gravatar_id":"","url":"https://api.github.com/users/drvinceknight","html_url":"https://github.com/drvinceknight","followers_url":"https://api.github.com/users/drvinceknight/followers","following_url":"https://api.github.com/users/drvinceknight/following{/other_user}","gists_url":"https://api.github.com/users/drvinceknight/gists{/gist_id}","starred_url":"https://api.github.com/users/drvinceknight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drvinceknight/subscriptions","organizations_url":"https://api.github.com/users/drvinceknight/orgs","repos_url":"https://api.github.com/users/drvinceknight/repos","events_url":"https://api.github.com/users/drvinceknight/events{/privacy}","received_events_url":"https://api.github.com/users/drvinceknight/received_events","type":"User","site_admin":false},"created_at":"2018-08-29T18:54:08Z","updated_at":"2018-08-29T18:54:08Z","author_association":"COLLABORATOR","body":"This is an interesting one. Let's have a chat about it?"}}
{"actor":{"display_login":"drvinceknight"}}