« first day (3439 days earlier)      last day (1734 days later) » 
00:00 - 14:0014:00 - 00:00

 
1 hour later…
01:26
why can't i flag things anymore
02:02
thats's not the reason
user13007670
hi
@NicolasGervais do you have any error ?
 
1 hour later…
03:20
Hi I plotted some graphs using some libraries in this notebook github.com/glakshmi-nyros/notebook1/blob/master/… I want to find out the todos in this notebook can anyone help me?
03:48
@stack can't see a single todo there
You mean I didnt did any todo specified in that todo @AndrasDeak
I skimmed the page and I didn't see any "todo". Searched the page for "todo" and 0 hits.
in the second cell see to do: and some points @AndrasDeak
to do: what is the trend for different KPIs? (impressions, CTR, etc) what is the seasonlaity? what are the peaks? what is the forecast? correlations? outliers? treating outliers month over month performance? these are the todo's @AndrasDeak
Is there anyway, once I insert some content into a sql database, to get a list of what changes were performed (i.e. columns that were updated and what values were they set to)?
Does the Python driver offer anything like this?
@stack What kind of help are you expecting here? That's a lot of data science in that todo list.
@DemCodeLines I'll go out on a limb and say "it depends on the driver". I don't know databases but I'm sure you'll have to specify what stack you're using
03:58
Yes I did the analysis and also plotted trend and seasonality even outliers at the bottom of the notebook but I am not understanding is it correct or not for that I need help @AndrasDeak
and here I want to plot the trend and seasonality month wise and also year wise and want to see that is it increasing or not how can I achieve this @AndrasDeak
 
1 hour later…
05:21
anyone is experienced in datascience here??
just consumers
@Todd ?
i'm just idly bantering stack sorry
Ok np
05:34
oh boy.. It's been a month since I've agonized over CSS
user11867329
Yeah, no worries
user11867329
I'll try to add an auto padding
there are so many options
user11867329
margin: auto
user11867329
worked
user11867329
05:35
Bingo
user11867329
Bong
depends on what layout manager you've got assigned to it
user11867329
?
oh good.. congrats
user11867329
w3 school "try-it"
user11867329
05:35
it's fairly standard
user11867329
I got this .overlay class
user11867329
and 80% width/height
user11867329
but wasn't centered
user11867329
CSS, once you get the hang
user11867329
Waaaay easier than actual coding
05:37
I made a chess program, I remember fiddling for hours with the CSS and js to get the board to resize with the page and remain square
i got to get back to that project soon
@Todd do you have any experience in data science?
no stack. sorry.. i'm interested in it, but know way too little to be of any help
user11867329
Holler at me if you need CSS
user11867329
May actually be helpful for once
Okay @Todd do anyone have experience in data science.
user11867329
05:41
@stack that's pretty broad
user11867329
What do you need, specifically?
if it's just a numpy or pandas problem then maybe =/
Actually I am doing time series analysis I want to find out trend, seasonality for a dataset
there are some todos in the second cell of notebook I want to do that
Here at the bottom of the notebook I plotted the trend seasonality but I want them monthly and yearly as seperate ones
@roganjosh that's pretty awesome
what formats your dataframe in a table like that? is that a jupyter notebook thing?
05:45
yes
interesting.. and it has integrated graphing?
No @Todd
i mean when you call the matplotlib api, it renders on the page inline?
Oh yes
I'll have to try jupyter out again. I tried figuring it out and couldn't find enough basic info to understand how it all worked.
05:57
Ok here what I want is from that data I should get month wise jan 2017 feb 2017 like that
for example here I am having 01-12-2017
11-01-2019
I should change that column as dec 2017
jan 2019 that is the requirement now
so that I can plot accordingly
so you just want to update the column to display datetime in a different format...
yes
what's the dtype of the column?
non-null datetime64[ns]
df['date'] = pd.to_datetime(df["date"].dt.strftime('%Y-%m'))
the format string is wrong, but is this the method to do it?
06:09
yes like this only I think
'%d %B, %Y' ... that'd be like "'15 March, 2020'"
if you don't want the day or the comma after the month, leave them out
Yes I need to "march 2020 "
now.strftime('%B %Y')
'March 2020'
Ok I will try
this works for me with a caveat.. df['timestamp'] = df['timestamp'].dt.strftime('%B %Y') it converts the datetime to object
if all you need to do is display the data, then that's fine.. but you lose the time resolution
06:25
I did like this clicks_pivot['Day'] = pd.to_datetime(clicks_pivot["Day"].dt.strftime('%B %Y'))
it not updated the column for me
right.. because you're just converting it right back into datetime
but you lost the hours/minutes/seconds from the resolution right
Yes
if all you want to do is display the table, then converting it to the string format is okay
ok
like clicks_pivot['Day'] = clicks_pivot["Day"].dt.strftime('%B %Y')
06:33
Yes got it now in my dataframe there are many rows containing august 2017 and january 2019 they all should add together and only one should come how can I achieve this?
for ex If I am having two august 2017 it should add together and should show as one august2017 so that it will be easy for plotting
@stack all of this stuff can be searched online. You've asked multiple times about data science and yet all you're actually trying to do is work out a format string for a datetime. I can already see this discussion becoming a drain on people
What is the actual data science part that you need help with?
Here actually I want to visualize trend , seasonality metrics for my time series data for that I need to get the data month wise and year wise
too bad we can't send private messages
anyway.. one last thing I just found. it talks about styling the table for display on jupyter and I think this might be relevant: stackoverflow.com/a/60273382/7915759 - that's as far as I can continue
@stack look up groupby. You want to groupby with a month and take the average (mean) and probably keep the standard deviation
This is not data science, it's basic data analysis. For time series you might want ARMA/ARIMA and then it starts going down the route of being data scienc-y but there's no need for us to walk you the whole way
@roganjosh can you please say whether the trend and seasonality plots are correct in my notebook I used seasonal_decompose
06:54
@stack what do you take from that graph? What is your interpretation?
btw @stack, it looks like that link I gave you might be what you're really looking for. It doesn't change the internal dtype, it just tells jupyter how to display the time using the formatting you provide.
@roganjosh from that I want to find the type of trend and what is seasonality and from the other graph I want to interpret what is the correlation and what are outliers
@Todd Yes I will try it
@stack that's fine. What I asked is what is your interpretation of those results?
The trend for Impressions and clicks is increasing nor decreasing
and about seasonality I didnt understood
What I'm getting at is that virtually every DS job description will include "able to describe complex relationships to various parts of the business".
So, if you don't understand the plot, why make it? FWIW, I have no idea what to take from the bottom graphs, either
07:09
But I followed the seasonal_decopmose tutorial and did it
Ok, but now neither of us understand what we're looking at. If this was a meeting at work, do you think that's productive?
No. @roganjosh
I'm giving you a hard time but, honestly, I've seen a lot of crap from data science teams
Business will only be interested in actionable analysis. If you're not confident in your own analysis or what it's telling you, it's not gonna help you
Here I am also new to this time series analysis thats why the problem occurs
a bit
you're a university student stack?
07:21
Completed bachelors degree of computer science @Todd
ah
user11297480
07:35
How to fit & predict in Cat-boost Algorithm
user11297480
I am new in python. I am trying to predict the "time_to_failure" for given "acoustic_data" in the test CSV file using catboost algorithm.
user11297480
def catbostregtest(X_train, y_train):
    # submission format
    submission = pd.read_csv('sample_submission.csv', index_col='seg_id')
    X_test = pd.DataFrame()
    # prepare test data
    for seg_id in submission.index:
        seg = pd.read_csv('test/' + seg_id + '.csv')
        ch = gen_features(seg['acoustic_data'])
        X_test = X_test.append(ch, ignore_index=True)
    # model of choice here
    model = CatBoostRegressor(iterations=10000, loss_function='MAE', boosting_type='Ordered')
user11297480
This function "catbostregtest" is giving me error with the errorlog

Traceback (most recent call last):

File "E:\dir\question.py", line 68, in main()

File "E:\dir\question.py", line 65, in main catbostregtest(X_train, y_train)

File "E:\dir\question.py", line 50, in catbostregtest model.fit(X_train, y_train)

File "C:\Users\xyz\AppData\Local\Continuum\anaconda3\lib\site-packages\catboost\core.py", line 4330, in fit save_snapshot, snapshot_file, snapshot_interval, init_model)

File "C:\Users\xyz\AppData\Local\Continuum\anaconda3\lib\site-packages\catboost\core.py", line 1690, in _fit train
you can format your code in chat by highlighting it and using [ctrl]+k
@frincit please see the room rules in regard to posting long code blocks. They should be hosted off-site and linked here. Also, you've failed to format the code
The formatting guide for chat is here
@towc fun way to pass the time, hey? The snow in one scene reminds me of Gandalf vs. The Balrog... fighting an epic battle for months :) I wonder who won?
07:57
general question about git and versioncontroll, I have set up a repo for my project, so far i have always created a new file when i made some changes to my current file and copy them into the new file. Is the general procedure working with one file and update the repo everytime changes are made on the file ?
correct, since internally, you're letting the version control actually "version control" this file for you.
there's also the choice of not updating the repo on every change, but rather when you're satisfied with whatever change you've made to be a "landmark" or "stable" point that you're happy to save
Both approaches let you essentially have a "safe" point to go back to in case something goes wrong
@HoboCoder if you're interested in investing some time to learn what git is supposed to achieve, there are some good tutorials out there:
Jul 25 '17 at 23:32, by wim
this is really nicely illustrated: Learn git branching
@Arne looks like a nice tutorial thanks !
Your IDE probably has integrated support for Git, to make it more intuitive.. but what you describe.. creating a new file each time you make changes and copying it.. I dunnno.. that might not be the right way
I use Pycharm wich has a nice VCS support, but I have never used it so far
08:09
ah.. great. I use that too. you can right-click on a file you made changes to, and there should be a Git menu item you can check out
(in the project navigator tree)
user10984358
@Arne just tried this, failed even in the Just type in 'git commit' twice to finish! :/ need to spend some time to read what it said
you still there @stack?
08:24
@TheNamesAlc I never tried it myself, just heard that it was good =D
I learned git the old-fashioned way; metric tons of trial and error
user10984358
its actually really good, I have been using TortoiseGit so far, didnt know what happened, now things are fitting in
@Todd yes
i just start a jupyter session and tried it, this works: df.style.format({'timestamp': lambda t: t.strftime('%B %Y')})
changes how it's displayed, but doesn't change the dtype - it's still datetime
Oh is it? Ok I will try
@TheNamesAlc Can you clarify how it failed? The course worked much better than I'm used to from git. ^^
user10984358
08:29
I was supposed to just type in that command instead I was clicking on the nodes and it apparently led to HEAD detached state :/
user10984358
nothing wrong with the site, its just me, re did that going on with merge now
good thing it wasn't a real repo then :D
jokes aside, they do teach you how to attach heads eventually, im guessing they weren't expecting people to go chopping heads off that early
oh wait, now jokes aside..
user10984358
lol, I didnt know clicking nodes executed some command
@stack when you execute that style command, it returns a styler object. You use that to display your dataframe. If you just execute it on the commandline, it displays
08:40
from queue import PriorityQueue

q = PriorityQueue()

q.put((2, 'code'))
q.put((1, 'eat'))
why does priority queue need a number in the put() python?
@Permian I don't think it "needs" it as such, but that's a common / nice way to ensure the order. From the docs: "A typical pattern for entries is a tuple in the form: (priority_number, data)."
@Permian did you read the docs?
thanks guys
@MisterMiyagi yes
08:59
cbg
09:13
cabbage felllas
Why does pandas take data which looks like this "43.18534" and interpret it like this "43.185340000000004"
i've finally figured out how to start using jupyter.. now I can understand the appeal
First one is how data looks in the csv file , second one is the python console
@Todd Its good but also little hard to get to used to if you are coming from pycharm
especially on not having the hand holding pycharm offers
it is what it is.. i certainly wouldn't use this to debug a project or as my main console
True..
@Anarach floats have limited precision and can't accurately represent all base-10 numbers
09:17
after I do some graphs, i'll be happy
@Aran-Fey Ummm.. I dont quite get you
@Anarach because of floating point precision. See stackoverflow.com/a/455634/2689986
why is pandas adding all those numbers at the last part of the number
43.18534 is a base 10 number. Floats are base 2. There is no way to accurately represent the number 43.18534 in base 2.
@Aran-Fey Ahh I see.. makes sense..So what does on do?
09:20
99% of the time you just ignore it. If you need arbitrary precision you can use decimal.Decimal, but that might not be a great idea in combination with pandas
These are geographical co ordinates so all these extra numbers at the end might add inaccuracies
oh.. alright.. Will see if it really messes up anythiong
thanks a ton
@Anarach use decimal.Decimal for coordinates.
Not sure how pandas will interact with them, but pretty sure all geo-libs would need tha
Nvm, take my words back, it wouldn't be as bad with float.
09:47
cbg-ning
how do you keep up with the quarantine?
cbg Andy
@AndyK no quarantine in my place yet (Dubai), but expecting by tomorrow. Fortunately me & my wife's workplace is the building opposite to my home, so not much troubles.
@shad0w_wa1k3r that's cool to hear. France is locked down, so everyone is swamping supermarkets fo buy toilet papers. Just had a look outside. There are queues... Good bye social distanciation
home office from tomorrow on, my productivity is going to drop a ton =/
government here is keeping it a little quiet, mostly to not invoke panic
@Arne I've always found working from home more productive strangely...
09:53
I might finally learn how to, but the few times if tried it didn't work out that well yet
@Arne do you have a room for that?
not a dedicated one, just the room where my and my wife's computer is in
so.. mostly used to play games. probably doesn't help focusing on work
Well... where I worked was basically 2.5 hours to get into the office on a mix of bus, train and tube... leaving at 6am to make sure to get in for 9am, already means you've spent a lot of time and hassle before you even have to start properly...
long commutes are the worst
Having an extra 2 hours sleep, leisurely grabbing yourself a cup of tea and a bite to eat and then starting at 8:30 not completely stressed out by commuting just means you get so much more done...
Then when you finish ~6pm, you can actually finish, without having another 3 hours travel back home... so you can have a proper dinner at a reasonable time and get a bit of life back
09:57
yeah, leaves you with a lot more lifetime.
talking about focus, I' have to get some stuff done today before I can't just harass people in the corridors about things I need to have any more, so rbrb from me for today
Have fun!
thanks, you too!
11:01
Sky news currently has 2 articles; one quoting the chair of the Royal Collage of GPs saying I should call 111 if I have symptoms and another titled "why you shouldn't automatically call 111 if you have coronavirus symptoms". This is... less than helpful
I think the idea was that originally you should call 111, but now it's if you have symptoms, then don't do anything for 7 days unless they get worse, then call 111
(I think the idea is that it's to avoid 111 being swamped with people just having a bog standard cold/similar... so if after a week you're still not any better/getting worse, then call and at that point they might do a test/etc...)
Problem is, the Chair is quoted on the rolling news after the other article was published. I understand the reasoning but it's really the time to keep coordinated with the message and we don't seem to be doing that :/
at least we're consistently confusing :)
Hahaha; I wouldn't be surprised if that was a legit tactic (not necessarily in this instance). I really wish there were more episodes of The Thick of It; now is a great time for box sets
I think Iannucci has given up on political satire as he couldn't beat real life at it right now :)
Think he's done Avenue 5 recently though?
11:14
front end design summed up in one image
@JonClements oh, I dont think I've heard of that tbh
laurel. i don't know if intentional or not...
@Aran-Fey I can think of summing it up in single words... but I don't wanna get flagged :p
11:16
huh, is imgur blocked for you?
let's just say, that seems appropriate :P
yeah, it is. i've got a lot of stuff blocked now
Haha, fantastic
@JonClements An image says more than a thousand curses
but yeah no, that really is frontend design summed up in one image :D
If you're interested, the image shows Firefox blatantly ignoring my CSS font-family values (more accurately, it uses different fonts than the ones I'm telling it to)
11:18
sounds like a perfectly reasonable thing to ignore.
it's your family, not mine!
oh, actually this reminds me of something
in CSS, more granular rules ignore the broader ones i think?
maybe the fonts are being overwritten by a more granular rule. (in my case, the css was being generated by a less file. it's a pain to overwrite anything once the css was generated, and we had to go tweak the less file itself instead)
You just need a healthy sprinkling of !important
oh, that seems important. i didn't know about that
(Hopefully you picked up on my sarcasm) :P
There are shorthand rules that set multiple values at once, but font-family isn't one of them
@roganjosh :P i thought we liked putting important everywhere!
11:25
if it wasn't in effect firefox would cross it out
(though yes, i genuinely did not know about important xD)
ah good point, yes
"Using !important has its purposes (though I struggle to think of them), but it's much like using a nuclear explosion to stop the foxes killing your chickens; yes, the foxes will be killed, but so will the chickens. And the neighbourhood." Interesting quote on the top answer :)
A tad dramatic but I get the message
11:58
Umm.... I wonder how one can do this and then not think to just loop and print...
12:21
@stack stop annoying people with this vague/broad data science question
Cabbage
We'll be able to follow questions soon, and to follow answers a little while later. See meta.stackexchange.com/questions/345148/…
Cabbage everyone
@PM2Ring nice, that would have been quite useful for some questions!
@MisterMiyagi Hopefully, it'll lead to more questions being reopened after the OP fixes them... assuming we can get OPs to fix their questions rather than abandoning them and asking a new question (which probably has most of the faults of the original).
12:37
@Govind75 please see our code formatting guide to chat and practice in the sandbox if necessary
How do I put plain text and code in the same message
Or is that not possible
not possible
Oh I see
I never even try now. I'll just post a message and the code separately
@Govind75 read the guide
12:42
Well, can you help me with the following:
class CommandGUI(Rubik):
 def __init__(self,commandMaster):
      #Create the cube
      super().__init__(9,["Red","Yellow","Green","White","Orange","Blue"])
Then later on...
class Menu(object):
 def __init__(self,master):
      commandRoot = Tk()
      commandRoot.title("move centre")
      User.__init__(self)
      CommandGUI.__init__(self,commandRoot)
And I receive the following error:
thanks
@Govind75 I find it weird that Menu calls User's and CommandGUI's __init__ without inheriting from them
Why does Menu.__init__ call User.__init__ and CommandGUI.__init__ even though it doesn't inherit from either one of those?
File "/Users/govindbhachu/Desktop/NEACube/Tkinter Class.py", line 13, in __init__
super().__init__()
TypeError: super(type, obj): obj must be an instance or subtype of type
And why does it accept a master argument when it spawns its own window anyway?
and style side note: you should have 4-space indents everywhere
12:44
I didn't want to inherit it I wanted aggregation/composition
Or maybe I'm confused
Then you have to create a User and a CommandGUI, not just call their __init__s
what if User's __init__ calls a method that doesn't exist on Menu?
Ah I see
Is it bad if I don't have any aggregation or composition in my code
depends on what kind of code you're writing, but 90% of the time no
It's for a computer science project - I need to do a class diagram and so far all I have is inheritances and association
12:48
Unless you're inheriting from builtin types...I seem to remember there being some weird behaviour there. I suspect in that case composition can be better.
I thought that if I implement aggregation and composition it'll make the class diagram look more "impressive"
I thought classes were defined to perform a certain function, not to look nice.
Yeah, but I get more marks for aggregation and composition
can't blame you for thinking that way, but i'd say primarily you should focus on classes making sense and modelling proper relations that you'd also agree with
Looking nice would still be better than looking impressive
12:49
@Govind75 nice
@Aran-Fey I suppose FireFox just uses the first font it can find that matches the requested family, but I don't know how it does that. Presumably, it has some sort of database of font names & families.
Okay
"Design a knife for buttering toast. Extra credit for each laser sight"
Well, if you're gonna be graded on that, it's a good chance to learn composition and inheritance. You won't write any useful code in school anyway
Maybe the laser can cook the bread as it goes. Now that's efficient
12:51
actually, i'd buy a knife that could cook the bread as i was spreading butter. 100%
I also have a question over class diagrams in general - things like association and dependencies are they overriden by the inheritance?
@Govind75 sorry, I don't know the fancy words
oh that looks perfect
Honestly, i also don't know the fancy words, but i'd assume they are independent fancy words.
Gah, kevin'd on product design :/
Okay
12:52
@PM2Ring Maybe, but given that Verdana is supposed to be a sans-serif font, it's weird that FF uses a font with "serif" in its name instead
@Govind75 there are a few regulars here who are better at theoretical software design, so don't give up just yet
@Aran-Fey perhaps it's...serifino, with very little feets?
at this point I wouldn't be surprised if that was indeed the case
grumbles about the whole of internet being blocked
google the font's name with image search and find a sample :)
12:57
oh, i was misled into thinking i'd get to see cute little feet on the font
sorry :(
@Aran-Fey Yes, that's bad. But to be fair, font handling is hard! Part of the complexity is due to the fact that some fonts cost money, but there are now lots of free fonts too, and of course the free versions of proprietary fonts can't use the same name as the proprietary font.
don't worry, it was me misleading me, as usual. :P
Not so au fait with delv-votes. Is this worthy or do we just leave it downvoted to oblivion?
@roganjosh I think it's fine as it is
12:59
i had to google au fait. guess i wasn't so....... au fait about au fait
seems worthy to me, I don't see it adding any value
I'm on the fence
I don't insist on it stayin around. But it's blatantly wrong enough that it doesn't matter to me either way. And it's not like an eval answer where it's great if there's an example.
the worst part of that answer is having put the word class in code markdown
Oh, I'm the only one here now who can actually cast a delvote. Heh.
Oh, and PM's here too \o
Yeah; if the consensus was a delv-vote, I was only gonna offload the task anyway :P
Has someone stolen my delvote privs? :*(
@ParitoshSingh now you can impress friends at dinner parties. When they're not banned :P
13:05
@AndrasDeak Oh hai
powerlurkers coming out from the shadows! :)
@ParitoshSingh I'm surprised given the level of blocking you've got there that you can access the chat here :)
so am i actually! Here's to hoping that doesn't change :P
oh, for what it's worth, i got my youtube unblocked on pretext of having to see some videos for some demos and whatnot. So im not too unhappy anymore, there's music!
cough and videos for demos ofcourse. cough
@AndrasDeak It's an ok answer... to a different question. ;) Maybe it could help someone who gets there by accident, but I'm tempted to del-vote it.
@AndrasDeak "Powerlurker" has an Iron Maiden song -ring to it, doesn't it?
13:22
stackoverflow.com/a/5754541/4799172 That's the answer roganjosh linked earlier. Only 1 more vote needed.
OK, gone
OP now has more rep...
@AndrasDeak That's what I thought too, but that answer was +4/-10, so they just lost 20 points. No wonder they didn't self-delete...
On the bright side, 10 people just got 2 points refunded. ;)
Maybe it'll be like the inspirational FB videos and the turtle just got freed from a stray net and they'll go on to be majestic. Or a shark. Sharks get freed too.
13:42
@PM2Ring ugh
@PM2Ring only costs 1 to down vote an answer... it's the OP that gets -2 :)
umm... I'm feeling rather pleased with my last pandas answer... this is normally the point where someone comes along and points out it's either 1) a bad idea or 2) point out how it'll break in horrible ways... paws crossed
Looks a pretty neat solution to me :)
me too... but just waiting for someone to point out something that ruins my happy moment :p
Which reminds me. I don't know how the new nullable integer types work with fillna
I haven't really tried using 'em yet... but that's my main concern :)
13:57
Ack
import pandas as pd
import numpy as np

df = pd.DataFrame({
    'a': [1.0, 2, pd.NA, 4],
    'b': [np.nan, 'hello', np.nan, 'blah'],
    'c': [1.1, 1.2, 1.3, np.nan]
})

df.fillna(df.dtypes.replace({'float64': 0.0, 'O': 'NULL'}), downcast='infer', inplace=True)
That puts a "NULL" in a
nice... to figure out the hierarchy then
But I'm not sure whether that approach is counter-intuitive by specifying pd.NA directly
00:00 - 14:0014:00 - 00:00

« first day (3439 days earlier)      last day (1734 days later) »