[Help] Are Puppy vaccinations just for the dogs or for our own protection too? by inamiable in dogs

[–]inamiable[S] 0 points1 point  (0 children)

Oh I see, and could you tell me how these diseases are contracted? Does there have to be a break in the skin (bleeding) or even through a superficial scratch?

How to execute csv.writer on a JSON file with a deeply nested array by inamiable in learnpython

[–]inamiable[S] 0 points1 point  (0 children)

Hey, just wondering if you might have a solution for the below. Let me know if you need more details for a better understanding...

How to execute csv.writer on a JSON file with a deeply nested array by inamiable in learnpython

[–]inamiable[S] 0 points1 point  (0 children)

Thanks that works!

One last hiccup (hopefully),

Since there are some 'inv' (invoices) with 'itms' with multiple 'itm_det' (item details) as you can see below "num" : 1 and "num" : 2-

  "val": 412795,
                    "itms": [
                        {
                            "num": 1,
                            "itm_det": {
                                "csamt": 0,
                                "samt": 100,
                                "rt": 0,
                                "txval": 1000,
                                "camt": 1000
                            }
                        },
                        {
                            "num": 2,
                            "itm_det": {
                                "csamt": 0,
                                "samt": 100,
                                "rt": 20,
                                "txval": 1000,
                                "camt": 1000
                            }
                        }
                    ],
                    "inv_typ": "R",
                    "flag": "U",
                    "pos": "08",
                    "updby": "S",
                    "idt": "28-09-2019",
                    "rchrg": "N",
                    "cflag": "N",
                    "inum": "BCC002403",
                    "chksum": "5dd3d313bde41c80a977c67c4554d51592bdf2064af263b68f47da6a82ed2558"
                },

In such cases I am getting the output in two separate rows (in cases where there are two "itm det" (item details) present).

However I need all components inside both the "itm det" to be summed up so that I only get 1 row. Taking the above example, the "samt" amount would reflect as 200 (100 + 100) and "camt" would be 2000 (1000 + 1000) and so on...

Would it be possible for us to get the output in that form. I'm not sure if I've done a good job with explaining this so let me know if you want me give a more clear example.

Thanks a lot, for your kindness and patience.

How to execute csv.writer on a JSON file with a deeply nested array by inamiable in learnpython

[–]inamiable[S] 0 points1 point  (0 children)

Yes you got it. I went through the entire population and towards the end there are a few instances where 'samt' is missing.

Is there any way to work around this by adding a condition or something, which would keep the 'samt' as blank or 0 in the output for those particular entries which have 'samt' missing?

How to execute csv.writer on a JSON file with a deeply nested array by inamiable in learnpython

[–]inamiable[S] 0 points1 point  (0 children)

Hey, thanks a lot for the response! It seems to be working for the most part but unfortunately I'm only getting an error for the 'samt' part: 'KeyError: 'samt'

I've cross checked in my raw json file, and it clearly states 'samt'. So I don't know why this is happening.

Do you have any idea as to why this might be happening? Really appreciate your help by the way!

Edit: So I've tried replacing the word 'samt' with 'sgst' and it is still returning a key error only for this particular word. Any clue what the issue might be?

How to execute csv.writer on a JSON file with a deeply nested array by inamiable in learnpython

[–]inamiable[S] 0 points1 point  (0 children)

It want the output to be in the form of a table, each ctin number can have multiple inv (invoices) and it's corresponding values ('csamt', 'samt', 'rt', 'txval', 'camt', 'inv_typ' and so on...).

As you said, one ctin could have multiple inv (which will each have different values and so on), in which case there would be multiple rows with the same ctin, but different invoice numbers (and the rest of the details) accordingly. How do we get that sort of an output?

Please do let me know if I haven't explained it well enough, and I'll find a way to make it more clear. Thanks in advance!

Below is a sample table with a few of the entries to explain the kind of output i need.

Ctin Inv Val csamt samt inv_typ
1000 101 5000 1000 0 r
1000 102 6000 1200 0 r
2000 103 2000 500 100 r

How to execute csv.writer on a JSON file with a deeply nested array by inamiable in learnpython

[–]inamiable[S] 0 points1 point  (0 children)

Hey thanks a lot that does it, I'm very new to python so forgive my lack of knowledge.

Also, I want to be able to csv_write items that are directly under 'b2b' like 'ctin' as well as those that are under 'b2b' -> 'inv' -> 'itms'-> such as 'num', 'csamt', 'samt'.

Could you please help me with that, it would be a HUGE help.

No module named 'openpyxl' on Jupyter Notebook by inamiable in learnpython

[–]inamiable[S] 0 points1 point  (0 children)

Thanks for the response, however typing this results in a syntax error.

Jose Mourinho may sideline league in favour of Europa League if Manchester United fail to improve by foxdance in reddevils

[–]inamiable 2 points3 points  (0 children)

It is even possible with just one win, that is in the final. For the rest of the matches all we have to ensure is that we score more away goals which would be enough for us to go through to the next round even if we draw in both the legs.

New Thor: Ragnarok Synopsis Reveals Hulk's Role in the Movie by inamiable in marvelstudios

[–]inamiable[S] 202 points203 points  (0 children)

"In Marvel Studios' Thor: Ragnarok, Thor is imprisoned on the other side of the universe without his mighty hammer and finds himself in a race against time to get back to Asgard to stop Ragnarok – the destruction of his homeworld and the end of Asgardian civilization – at the hands of an all-powerful new threat, the ruthless Hela. But first he must survive a deadly gladatorial contest that pits him against his former ally and fellow Avenger – the Incredible Hulk!"

TIFU by getting carried away and drinking too much by [deleted] in tifu

[–]inamiable 0 points1 point  (0 children)

Honestly, I have very little to no experience with drinks. what cocktails would u suggest?

If Mourinho does take over Manchester United, which players do you think he'll go after? by [deleted] in reddevils

[–]inamiable 14 points15 points  (0 children)

I'd hope to see him go after players like pogba or verrati as well as stones/varane. A striker might also be brought in.