Plotting from large Dataset in Python











up vote
1
down vote

favorite












I am facing a collection of 50000 data points (incurred losses in insurance) and want to find a fitting distribution. Since I would like to make a plot in python it is not working - but it should be very simple e.g. making a plot of the first 500 incurred losses :



df = pd.read_excel('data.xlsx')
plt.hist(df[1:500], bins='auto')


but the plot is empty.



What do you think?



Thank you in advance and kind regards :)










share|improve this question









New contributor




Math_Man1 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • please provide a sample of the data
    – Vivek Kalyanarangan
    Nov 19 at 11:29










  • due to data protection I am not quite sure, if I can provide you with the exact data, but : it's a list containing 52000 entries in the range of 20$ up to 3.000.000$. The aggregation of the data should be done automatically with bins='auto' ....
    – Math_Man1
    Nov 19 at 11:43






  • 1




    just add some random data that will reproduce your problem, if you can't add the actual data that you are using.
    – user3471881
    Nov 19 at 12:18










  • Hi, maybe its usefull to group the losses before? like: group 1 : 0-500$ group 2: 501-1000$ and so on is this possible via the groupby function?
    – Math_Man1
    2 days ago

















up vote
1
down vote

favorite












I am facing a collection of 50000 data points (incurred losses in insurance) and want to find a fitting distribution. Since I would like to make a plot in python it is not working - but it should be very simple e.g. making a plot of the first 500 incurred losses :



df = pd.read_excel('data.xlsx')
plt.hist(df[1:500], bins='auto')


but the plot is empty.



What do you think?



Thank you in advance and kind regards :)










share|improve this question









New contributor




Math_Man1 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • please provide a sample of the data
    – Vivek Kalyanarangan
    Nov 19 at 11:29










  • due to data protection I am not quite sure, if I can provide you with the exact data, but : it's a list containing 52000 entries in the range of 20$ up to 3.000.000$. The aggregation of the data should be done automatically with bins='auto' ....
    – Math_Man1
    Nov 19 at 11:43






  • 1




    just add some random data that will reproduce your problem, if you can't add the actual data that you are using.
    – user3471881
    Nov 19 at 12:18










  • Hi, maybe its usefull to group the losses before? like: group 1 : 0-500$ group 2: 501-1000$ and so on is this possible via the groupby function?
    – Math_Man1
    2 days ago















up vote
1
down vote

favorite









up vote
1
down vote

favorite











I am facing a collection of 50000 data points (incurred losses in insurance) and want to find a fitting distribution. Since I would like to make a plot in python it is not working - but it should be very simple e.g. making a plot of the first 500 incurred losses :



df = pd.read_excel('data.xlsx')
plt.hist(df[1:500], bins='auto')


but the plot is empty.



What do you think?



Thank you in advance and kind regards :)










share|improve this question









New contributor




Math_Man1 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I am facing a collection of 50000 data points (incurred losses in insurance) and want to find a fitting distribution. Since I would like to make a plot in python it is not working - but it should be very simple e.g. making a plot of the first 500 incurred losses :



df = pd.read_excel('data.xlsx')
plt.hist(df[1:500], bins='auto')


but the plot is empty.



What do you think?



Thank you in advance and kind regards :)







python python-3.x pandas matplotlib






share|improve this question









New contributor




Math_Man1 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Math_Man1 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited Nov 19 at 12:39









user3471881

8791619




8791619






New contributor




Math_Man1 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Nov 19 at 11:20









Math_Man1

63




63




New contributor




Math_Man1 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Math_Man1 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Math_Man1 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • please provide a sample of the data
    – Vivek Kalyanarangan
    Nov 19 at 11:29










  • due to data protection I am not quite sure, if I can provide you with the exact data, but : it's a list containing 52000 entries in the range of 20$ up to 3.000.000$. The aggregation of the data should be done automatically with bins='auto' ....
    – Math_Man1
    Nov 19 at 11:43






  • 1




    just add some random data that will reproduce your problem, if you can't add the actual data that you are using.
    – user3471881
    Nov 19 at 12:18










  • Hi, maybe its usefull to group the losses before? like: group 1 : 0-500$ group 2: 501-1000$ and so on is this possible via the groupby function?
    – Math_Man1
    2 days ago




















  • please provide a sample of the data
    – Vivek Kalyanarangan
    Nov 19 at 11:29










  • due to data protection I am not quite sure, if I can provide you with the exact data, but : it's a list containing 52000 entries in the range of 20$ up to 3.000.000$. The aggregation of the data should be done automatically with bins='auto' ....
    – Math_Man1
    Nov 19 at 11:43






  • 1




    just add some random data that will reproduce your problem, if you can't add the actual data that you are using.
    – user3471881
    Nov 19 at 12:18










  • Hi, maybe its usefull to group the losses before? like: group 1 : 0-500$ group 2: 501-1000$ and so on is this possible via the groupby function?
    – Math_Man1
    2 days ago


















please provide a sample of the data
– Vivek Kalyanarangan
Nov 19 at 11:29




please provide a sample of the data
– Vivek Kalyanarangan
Nov 19 at 11:29












due to data protection I am not quite sure, if I can provide you with the exact data, but : it's a list containing 52000 entries in the range of 20$ up to 3.000.000$. The aggregation of the data should be done automatically with bins='auto' ....
– Math_Man1
Nov 19 at 11:43




due to data protection I am not quite sure, if I can provide you with the exact data, but : it's a list containing 52000 entries in the range of 20$ up to 3.000.000$. The aggregation of the data should be done automatically with bins='auto' ....
– Math_Man1
Nov 19 at 11:43




1




1




just add some random data that will reproduce your problem, if you can't add the actual data that you are using.
– user3471881
Nov 19 at 12:18




just add some random data that will reproduce your problem, if you can't add the actual data that you are using.
– user3471881
Nov 19 at 12:18












Hi, maybe its usefull to group the losses before? like: group 1 : 0-500$ group 2: 501-1000$ and so on is this possible via the groupby function?
– Math_Man1
2 days ago






Hi, maybe its usefull to group the losses before? like: group 1 : 0-500$ group 2: 501-1000$ and so on is this possible via the groupby function?
– Math_Man1
2 days ago



















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






Math_Man1 is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53373534%2fplotting-from-large-dataset-in-python%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes








Math_Man1 is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















Math_Man1 is a new contributor. Be nice, and check out our Code of Conduct.













Math_Man1 is a new contributor. Be nice, and check out our Code of Conduct.












Math_Man1 is a new contributor. Be nice, and check out our Code of Conduct.















 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53373534%2fplotting-from-large-dataset-in-python%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

404 Error Contact Form 7 ajax form submitting

How to know if a Active Directory user can login interactively

TypeError: fit_transform() missing 1 required positional argument: 'X'