text:
using System;
using System.Collections.Generic;
using System.Text;
using NServiceKit.Logging;

namespace NServiceKit.Redis.Pipeline
{
	internal class QueuedRedisOperation
	{
		protected static readonly ILog Log = LogManager.GetLogger(typeof(QueuedRedisOperation));

		public Action VoidReadCommand { get; set; }
		public Func<int> IntReadCommand { get; set; }
		public Func<long> LongReadCommand { get; set; }
		public Func<bool> BoolReadCommand { get; set; }
		public Func<byte[]> BytesReadCommand { get; set; }
		public Func<byte[][]> MultiBytesReadCommand { get; set; }
		public Func<string> StringReadCommand { get; set; }
		public Func<List<string>> MultiStringReadCommand { get; set; }
		public Func<double> DoubleReadCommand { get; set; }

		public Action OnSuccessVoidCallback { get; set; }
		public Action<int> OnSuccessIntCallback { get; set; }
		public Action<long> OnSuccessLongCallback { get; set; }
		public Action<bool> OnSuccessBoolCallback { get; set; }
		public Action<byte[]> OnSuccessBytesCallback { get; set; }
		public Action<byte[][]> OnSuccessMultiBytesCallback { get; set; }
		public Action<string> OnSuccessStringCallback { get; set; }
		public Action<List<string>> OnSuccessMultiStringCallback { get; set; }
		public Action<double> OnSuccessDoubleCallback { get; set; }

		public Action<string> OnSuccessTypeCallback { get; set; }
		public Action<List<string>> OnSuccessMultiTypeCallback { get; set; }

		public Action<Exception> OnErrorCallback { get; set; }

		public virtual void Execute(IRedisClient client)
		{

		}

		public void ProcessResult()
		{
			try
			{
				if (VoidReadCommand != null)
				{
					VoidReadCommand();
					if (OnSuccessVoidCallback != null)
					{
						OnSuccessVoidCallback();
					}
				}
				else if (IntReadCommand != null)
				{
					var result = IntReadCommand();
					if (OnSuccessIntCallback != null)
					{
						OnSuccessIntCallback(result);
					}
					if (OnSuccessLongCallback != null)
					{
						OnSuccessLongCallback(result);
					}
					if (OnSuccessBoolCallback != null)
					{
						var success = result == RedisNativeClient.Success;
						OnSuccessBoolCallback(success);
					}
					if (OnSuccessVoidCallback != null)
					{
						OnSuccessVoidCallback();
					}
				}
				else if (LongReadCommand != null)
				{
					var result = LongReadCommand();
					if (OnSuccessLongCallback != null)
					{
						OnSuccessLongCallback(result);
					}
					if (OnSuccessBoolCallback != null)
					{
						var success = result == RedisNativeClient.Success;
						OnSuccessBoolCallback(success);
					}
					if (OnSuccessVoidCallback != null)
					{
						OnSuccessVoidCallback();
					}
				}
				else if (DoubleReadCommand != null)
				{
					var result = DoubleReadCommand();
					if (OnSuccessDoubleCallback != null)
					{
						OnSuccessDoubleCallback(result);
					}
				}
				else if (BytesReadCommand != null)
				{
					var result = BytesReadCommand();
					if (OnSuccessBytesCallback != null)
					{
						OnSuccessBytesCallback(result);
					}
					if (OnSuccessStringCallback != null)
					{
						OnSuccessStringCallback(result != null ? Encoding.UTF8.GetString(result) : null);
					}
					if (OnSuccessTypeCallback != null)
					{
						OnSuccessTypeCallback(result != null ? Encoding.UTF8.GetString(result) : null);
					}
					if (OnSuccessIntCallback != null)
					{
						OnSuccessIntCallback(result != null ?  int.Parse(Encoding.UTF8.GetString(result)) : 0);
					}
				}
				else if (StringReadCommand != null)
				{
					var result = StringReadCommand();
					if (OnSuccessStringCallback != null)
					{
						OnSuccessStringCallback(result);
					}
					if (OnSuccessTypeCallback != null)
					{
						OnSuccessTypeCallback(result);
					}
				}
				else if (MultiBytesReadCommand != null)
				{
					var result = MultiBytesReadCommand();
					if (OnSuccessMultiBytesCallback != null)
					{
						OnSuccessMultiBytesCallback(result);
					}
					if (OnSuccessMultiStringCallback != null)
					{
						OnSuccessMultiStringCallback(result != null ? result.ToStringList() : null);
					}

					if (OnSuccessMultiTypeCallback != null)
					{
						OnSuccessMultiTypeCallback(result.ToStringList());
					}

				}
				else if (MultiStringReadCommand != null)
				{
					var result = MultiStringReadCommand();
					if (OnSuccessMultiStringCallback != null)
					{
						OnSuccessMultiStringCallback(result);
					}
				}
			}
			catch (Exception ex)
			{
				Log.Error(ex);

				if (OnErrorCallback != null)
				{
					OnErrorCallback(ex);
				}
				else
				{
					throw;
				}
			}
		}

	}
}


hepatitis hĕp˝ətī´tĭs [key], inflammation of the liver. There are many types of hepatitis. Causes include viruses, toxic chemicals, alcohol consumption, parasites and bacteria, and certain drugs. Symptoms of hepatitis are nausea, fever, weakness, loss of appetite, sudden distaste for tobacco smoking, and jaundice .
Hepatitis can be incurred as a complication of several other disorders in addition to viral infection, among them amebic dysentery , cirrhosis of the liver, and mononucleosis . Also, alcohol, carbon tetrachloride, some tranquilizers and antibiotics, and many other substances can produce a toxic reaction in the liver, resulting in toxic hepatitis.


text:
Metropolitan-Vickers Steam turbine and Generator
1937-1938 in Trafford
Metropolitan-Vickers Electrical Company Limited
This image is released under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 Licence
Detail view of the Steam turbine and generator, made by Metropolitan-Vickers Electrical Co. Ltd, Trafford Park,
Science Museum Group Collection
© The Board of Trustees of the Science Museum
Steam turbine and generator, made by Metropolitan-Vickers Electrical Co. Ltd, Trafford Park, 1937-8, with accompanying copies of original General Arrangement and Assembly Drawings used during the refurbishment of the turbine. Originally used to generate electricity for a brickworks, removed by Metro-Vicks apprentices and used for training purposes. Output through the alternator is 375kVA, equivalent to c.300 Kilowatts, three-phase power, or equivalent to 300 single-bar electric fires. The turbine is c. 400 horsepower, about as much as five small cars.
Y1970.39
steam turbine
furnishing and equipment
Gift of English Electric A.E.I Ltd
Peel, Williams & Peel steam engine (steam engine)
National Diesel Engine (diesel internal combustion engine)
Lancashire Boiler (steam boiler)
Firgrove Mill Steam Engine (steam engine)
Crossley Horizontal Single-cylinder Engine (gas internal combustion engine)
Crossley Type IHD4 Diesel Engine (diesel internal combustion engine)

redpajama_set_name: RedPajamaCommonCrawl


Everyone wishes to stay healthy. Well toned abs is a sign of good health and fitness. Women especially after delivery find difficult to reduce belly fat as it is a hard nut to crack. Loosing belly fat is very challenging for both men and women as the fat deposition occurs very fast but does not reduce easily in this area. Belly fat is harmful as it covers around our visceral organs and can cause high risk to overall health. Try these natural methods and lose belly fat in just two weeks. If continued, more effective results have seen.
1. Start your day with warm water and lemon. One of the best therapies to cut fat in the whole body especially belly area. To a glass of warm water, add half slice lemon. Honey can be added if needed. This is to be taken in empty stomach just after waking up. It flushes out toxins from the body and boost metabolism to get rid of the flab.
2. Say 'No' to white rice, maida and sugar. White rice, white pasta, white bread, sugar and maida adds to fat deposit and not good for digestive system. Brown rice has insoluble fibres and vitamins that helps to clean the digestive system and helps to loose weight easily. Such foods like white rice, sugar etc increases fat around abdomen and thigh. So reduce the intake of these foods and slowly kick it off permanently from your diet menu.
3. Exercise or Yoga for 30 minutes minimum should be a routine. For effective fat shedding around the waist exercises like basic crunches, side crunch, twist crunch, bicycling exercises, reverse crunches should be done to focus abs muscles, lower back and sides. In addition to that anyone of the following like brisk walking, jogging or cycling should be done for at least half an hour for burning away the abdominal fat fast. If the person is a regular practitioner of yoga, more focus should be given for Asanas like Surya Namaskar, Pada Hasthasana, Naukaasana, Pavanamuktasana, Bhujangasana etc. Pranayama or Breathing exercise like Kapal Bhati and Nadi Shuddhi is very helpful to cleanse the body systems, burn out belly fat. 30 minutes of Asanas and 30 minutes of breathing exercise is enough to burn belly fat.
4. Diet should be selective and healthy. Avoid fatty, oily and junk food. Take healthy veggies, fruits, proteins like pulses, fishes, lean meat, eggs etc. While exercising one may feel increased appetite which may lead to increased hunger and cravings for sugary foods and snacking at uneven times. Make sure to have enough protein like pulses, fishes, eggs etc in diet that prevent the muscle from starvation and make the meal fulfilling. Include fruits rich in vitamin C like Amla, Guava, Citrus etc as it helps to reduce cortisol and help burn fat fast.
5. Always snack on fruit diet – Even if one may be exercising well still if there is no marked change in the waist line, make sure that snacking in between meals is avoided. Have a bowl of fruits or vegetables as snacks or tiffin in the evening. Avoid sugary juices sweetened and artificial drinks and foods.
6. Drink plenty of water. Keep yourself hydrated, drink at least 8 – 10 glasses of water to get rid of belly fat. Drink water at regular intervals to boost the metabolism and remove toxins from the body.
7. Avoid skipping meals and keep away from strict following liquid meals. Skipping meals may hike insulin levels which may lead to sugar fluctuations, more hunger and weight gain. Skipping meals especially break fast causes muscle tissue to breakdown for energy and conserve the fat. Eating healthy break fast helps to keep the metabolism perfect. Strict Liquid meals are not healthy as it does not give us energy for a day and thus the muscle tissue burns out for energy leaving us starved and hungry.
8. Sleep well. Sleep at least 8 hours at night. Avoid day sleep. Lack of sleep increases cravings for sugary and fatty foods, increases cortisol hormone which makes one insulin insensitive and the Bio-rhythm of the body is lost. Also never sleep after heavy meals as it makes stomach flat and bloated. So keep off from unhealthy habit of rest after heavy meals.
Follow these 8 essential points to get a marked change in two weeks itself. The most mandatory of all these points is to have patience while following such a regimen as loosing fat is one of the most difficult tasks which has no short cut and requires hard work and patience, discipline and self control to achieve desired results. So the key is never give up, stick to your resolutions. Keep doing the good work and you will explore amazing results. Keep fit and stay healthy.


Ellen DeGeneres is hosting a show tonight and she wants a new look for her show. Can you give this celebrity television host a makeover that makes her looks smart and stylish? Use various facial treatments to get her that makeover she deserves.


text:
<?php

namespace spec\Sylius\Bundle\ResourceBundle\Fixture\Document;

/**
 * Foo document.
 *
 * @author Ivannis Suárez Jérez <ivannis.suarez@gmail.com>
 */
class Foo
{
}

redpajama_set_name: RedPajamaGithub


text:
Deloitte analysis: The M&A market regained its pace in the second quarter of 2019
The mergers and acquisitions market in Romania revealed a significant growth in the second quarter of the year, compared to the first quarter and to the same period in 2018 as well.
According to Deloitte estimates, the total market value, including transactions with undisclosed value, has been between EUR 1.4 and 1.6 billion, while the value of disclosed transactions reached around EUR 790 million.
"In the mergers and acquisitions market, the second quarter of the year has witnessed two premieres: the EUR 568 million financing raised by UiPath, which valuated the company at USD 7 billion, a record value for a Romanian start-up, and the acquisition by EximBank, a bank owned by the Romanian Government through the Ministry of Finance, of Banca Romaneasca. This is the fourth encounter with UiPath in our quarterly reports: the first one was in 2017, then twice in 2018, the company showing remarkable growth from one time period to another," said Ioana Filipescu Stamboli, Partner Corporate Finance, Deloitte Romania.
The total number of transactions announced in the second quarter was 30, including those with undisclosed value. For comparison purposes, in the first three months of the year, the M&A market has witnessed 16 transactions, whilst the second quarter of 2018 counted 27.
"Following a sluggish start, the M&A market regained its pace in the second quarter, with at least four transactions of above EUR 100 million. In the first semester of the year, the M&A market – based on the transactions with disclosed value - reached EUR 909 million. At the same time, the trend of not reporting the value of transactions intensified," added Ioana Filipescu Stamboli.
"In the real estate sector, the M&A market maintained its dynamism throughout the period, the biggest transaction being Dedeman's takeover of Cluj-Napoca's office building The Office," stated Irina Dimitriu, Partner in Reff & Associates, the law firm representing Deloitte Legal global network in Romania.
The biggest transactions announced in second quarter of 2019
the RPA company UiPath's new financing round of USD 568 million (~EUR 500 million), which set a new record for its valuation, of USD 7 billion, with multiple financial investors participating in this round;
EximBank's takeover of 99.28% of Banca Romaneasca, from National Bank of Greece (undisclosed value);
the acquisition of a minority stake in Superbet, the biggest player on the Romanian sport bets market, by private equity fund Blackstone (value: EUR 175 million);
Paval brothers' (Dedeman owners) acquisition of Cluj-Napoca's The Office building (undisclosed value);
the investment of close to EUR 60 million announced by CEE Equity to modernize and develop 15 grain silos and logistic hubs of the Brise Group.
Romanian M&A market, in Q2 2019:
market value (transactions with disclosed value, including the UiPath mega transaction): EUR 790 million;
market value (including transactions with undisclosed value and the UiPath mega transaction – Deloitte estimate): EUR 1.4–1.6 billion;
number of transactions (including undisclosed deals): 30;
average value (excluding the UiPath mega transaction): EUR 36 million.
Deloitte Romania coordinates an integrated multidisciplinary M&A practice, with a holistic approach that ranges across multiple service lines, including M&A Advisory, Transaction Services, Fiscal Advisory and Legal Advisory. Deloitte teams of skilled professionals can thus cover all relevant aspects of a transaction.
Audit Tax Consulting Financial Advisory Bookkeeping Human Capital CFO Services
Tags : Deloitte , M&A , Ioana Filipescu Stamboli , transactions


The top thing to start with is removed all refined carbohydrates. You need to get insulin controlled and also minimizing carbs is the very best means to do this. As long as the body is draining insulin you will certainly never ever become a fat burning maker. As insulin levels drop your body will start to secrete sodium and also you will shed water weight along with melting fat. Study after research has shown that a high fat diet regimen is much more successful in weight reduction that a low fat diet regimen. Insulin resistance is one of the main elements of chronic illness today and reducing carbohydrates will certainly assist you get control of this.
It is very important to have fats as well as proteins in all your dishes. Carbohydrates are not essential since your body can make them. It is important to not overdo the healthy protein since your body can also convert that to sugar. Additionally, high protein intake and cancer are correlated. Keep in mind that animal increased today in big business procedures are full of prescription antibiotics and hormone as well as both will certainly hinder you from dropping weight.
Fats additionally add to systemic inflammation if you are eating the wrong fats. Primarily do away with all vegetable oils in your diet and also you will certainly be much healthier. Healthy and balanced fats leave you really feeling overfilled and will reduce snacking so make certain you eat great deals of healthy and balanced fats. Your carbohydrates ought to be coming from veggies. Quit eating starchy carbohydrates and your body will thanks. Another gain from veggies is the high fiber content which makes your internet carbohydrates even lower. Like your mom constantly stated "Consume your veggies".
If I were to decrease fat burning right into my top 2 ideas this is exactly what I would do. Very first thing is I would certainly lower the amount of carbohydrates I eat. Simply removing all processed carbohydrates would be enough. That suggests basically nothing that comes in a box. Cereal, rice, pasta, and bread are instances of this. In the initial I would quit consuming starches also. You can reestablish them after you have reached your ideal weight.My second top idea is get rid of all vegetable oils. The processing included with these oils make them harmful. If you prepare with them you will certainly be getting trans fats. I think at this point every person recognizes that trans-fats are extremely toxic to you. All veggie oils have a small amount of trans-fats in them. When you prepare with them the trans-fats could go from around 1 %to 20 %. Simply do not do it. Instead cook with wellness saturated oils such as palm oil, coconut oil, or even butter. Butter is a staple in my life currently as well as I am much healthier for it.
Vegetable oils are harmful. If you prepare with them you will certainly be getting trans fats. I think at this point every person recognizes that trans-fats are extremely toxic to you. All veggie oils have a small amount of trans-fats in them. When you prepare with them the trans-fats could go from around 1 %to 20 %. Simply do not do it. Instead cook with wellness saturated oils such as palm oil, coconut oil, or even butter. Butter is a staple in my life currently as well as I am much healthier for it.
Did you recognize that Alzheimer's is called diabetes mellitus type 3 currently? Diabetic issues is a nutritional disease and also if you intend to control or reverse it you should alter your diet plan. The Loveland Medical Clinic educates individuals on diet plan so they could obtain control of their health without having to take tablets. We show you exactly what foods you ought to be eating and also what foods to stay clear of. The federal government and BIG AG has lied to the American public for the last 3 decades which is why 66% of the American public is obese or overweight. How about we do some preventative medicine as well as obtain control of our wellness currently prior to we go broke as a country.
There are countless healthy and balanced diet plan plans there.Any person needs to be able to lose weight on any kind of diet strategy. Whether or not the strategy benefits your total health is debatable. You have actually become aware of all the strategies. Weight Watchers, Metabolic Research Center, Slimfast, and also the list takes place. Some usage hormone therapy as well as others try to sell you on their supplements. I am sorry however injecting HCG and also eating a 800 calorie diet regimen is simply not healthy. If you look at the active ingredients of several of the supplements these business are marketing you will see that there is a lot of junk in them. You can not just lower calories, you have to transform your diet plan. The Loveland Medical Clinic shifts our person to a healthy and balanced lifestyle and diet that will certainly allow you to age with dignity. It is not just the length of time you live, it is exactly how functional you are at your age. I still want to be able to ride my bike up a hill at 80 years of age. How around you?
The mission of the Loveland Medical Clinic is to instruct people the best ways to maximize their wellness so they could live as well as age beautifully.


text:
Challenger, Gray & Christmas, Inc.
LoginContact Us
2018 April CEO Report: Highest YTD Since 2014
While April saw the economy add 164,000 jobs and the unemployment rate edge down to 3.9 percent, a total of 109 Chief Executive Officers left their posts at U.S.-based companies during the month, according to a report released Wednesday by global outplacement consultancy and executive coaching firm Challenger, Gray & Christmas, Inc.
Last month's total is 19.8 percent higher than the 91 CEOs who left their posts in April 2017 and 13.5 percent higher than the 96 tracked in March. So far this year, 450 CEO changes have been announced, 14.8 percent higher than the 392 CEO changes tracked in the first four months of last year. This is the highest January-April total since 2014, when 460 CEOs left their posts.
"Although the economy seems to be booming, companies appear to be readying for change," said Andrew Challenger, Vice President of Challenger, Gray & Christmas, Inc.
The Government/Non-Profit sector continues to lead all industries in departures, with 87, 23 of which occurred in April. This sector announced 64 percent more CEO changes in 2018 than through the same period last year.
"The increased activity in Government and Non-Profit entities could be due to changing legislation and redistribution of federal funding. Other sectors that have seen an increase in CEO change activity include the Computer industry, which is seeing a number of disruptive technologies, as well as those related to consumer behavior," noted Challenger.
Computer companies announced 58 exits so far this year, with 18 last month. Computer companies have announced nearly 71 percent more CEO changes this year than the 34 changes that occurred through this period last year.
Health Care/Products firms have announced 45 CEO exits in 2018, including nine in April. Financial companies have reported 43 through the year.
Most CEOs (135), have stepped down into other positions within the company, usually as a Board Member or other C-Level executive. Another 132 retired from their positions and 60 resigned.
California companies saw the highest number of CEO changes this year with 49, 12 of which occurred in April. Companies in Texas saw 12 departures last month, while Florida reported 11.
April18 CEO Report.pdf
Colleen Madden Blumenfeld
Email: colleenmadden@challengergray.com
outplacement (363) executive coaching (328) Job Cut Report (96) CEO Turnover Report (79) Economy (65) job search monday (55) Job Hunt (54) Morale (47) Challenger Networking Group (46) HumaninHR (45) Holiday Hiring (44) Retail (42) productivity (42) human resources (42) Survey (34) leadership (32) Teen Employment (29) teamchallenger (25) Oil Prices (25) succession planning (23) employment (23) culture (23) Outlook (22) Job Seeker Call-In (19) Tech (19) jobtipthursday (18) Hiring (18) college grads (17) management (17) Tech Cuts (16) Summer Jobs (16) SHRM2015 (16) Sales (15) Philadelphia (15) #metoo (15) Labor Shortage (15) Technology (14) Women (14) podcast (14) networking (14) Social Media (13) workplace (13) job search advice (13) job search (13) Relocation (12) Compensation (12) Quarterly Reports (11) Boston (11) Older Workers (11) California (11) Retention (10) Jobs (10) Job Cuts (10) Start-Ups (9) Sales Executive Appointments (9) recruitment (9) Los Angeles (9) March Madness (8) NYC (8) talent management (8) interviews (8) Holiday Parties (8) Affordable Care Act (8) Benefits (8) Chicago (8) Politics (7) Millennials (7) Index Newsletter (7) SHRM (6) Retirement (6) hot jobs (6) career tips (6) Flu (6) bullies (6) Fantasy Football (6) Job Cut Release Calendar (5) Internships (5) Quits Rate (5) Long-Term Joblessness (5) HR Department of the Year Awards (5) sports (5) Health Care (5) Houston (5) Coaching (5) automotive (5) Energy (5) FutureWork (5) global economy (5) sexual misconduct (4) John Challenger (4) resumes (4) jobsearchmonday (4) Super Bowl (4) Sponsorship (4) job creation (4) Whitepaper (4) Vacations (4) executive search (4) Entrepreneurs (4) dress codes (4) college students (4) humanresources (4) CEHRG (4) Financial Jobs (4) Holiday Party (4) Holiday Bonuses (4) Health Reform (4) San Diego (3) Michigan (3) Telecommuting (3) Trump (3) Labor Day (3) women CEO (3) Donald Trump (3) Government (3) Career Star Group (3) AndyChallenger (3) commentary (3) Education (3) Florida (3) Executive Appointments (3) bad bosses (2) HRMAC (2) Minneapolis (2) Microsoft (2) job seekers (2) Industry Switching (2) Minnesota (2) Rick Cobb (2) Career (2) veterans (2) Special Olympics (2) Salary (2) Sequestration (2) workforce (2) Dallas (2) Consumer Confidence (2) Halloween (2) CHRE Houston (2) Career Help Hotline (2) CHRA (2) Connecticut (2) gig economy (2) Data (2) executives (2) Equal Pay (2) diversity (2) engagement (2) Ohio (1) NewsRoundup (1) Office Romance (1) office pools (1) Pharmaceutical (1) Outsourcing (1) Pennsylvania (1) participation rate (1) parents (1) paid time off (1) minimum wage (1) New York (1) media (1) MBA (1) Massachusetts (1) Pittsburgh (1) Mergers (1) Millenials (1) New Haven (1) New England (1) NCAA (1) MISHRM (1) tariffs (1) PokemonGO (1) Twitter Chat (1) Trends (1) Trans-Pacific Partnership (1) Trade (1) Unions (1) Video (1) YWCA (1) Year-End Job Cuts (1) World Cup (1) Workplace Violence (1) Tax Reform (1) Marijuana (1) Referral Bonus (1) recognition (1) recession (1) Portland (1) San Francisco (1) Seattle (1) Strategies (1) Stay Interviews (1) Shutdown (1) self confidence (1) Shrm14 (1) HRSWC (1) Legislation (1) Coaches Conference (1) Cisco (1) Challenger University (1) Challenger (1) Cobb (1) Contest (1) discouraged workers (1) Detroit (1) data privacy (1) Cyber Monday (1) ChallengeHER CHRO Dinner (1) CEO Turnover (1) Awards (1) Arizona (1) Amazon (1) 2015 Coaches Conference (1) basketball (1) Brexit (1) CEO (1) CEHRGNY (1) CASA (1) BYOD (1) discrimination (1) Ebola (1) Job (1) Jeanne Mason (1) International (1) humor (1) Job Boom (1) job loss (1) layoffs (1) LA2015 (1) Kentucky (1) job seeker frustrations (1) human resources. humaninHR (1) HREA (1) Facebook Contest (1) Facebook (1) executive moves (1) Election Day (1) First Business (1) flexible schedules (1) Housing (1) helicopter parents (1) Groupon (1) freelance (1) GenZ (1)
© Copyright 2019 Challenger, Gray & Christmas. All Rights Reserved. Privacy Policy 1.312.332.5790 | 150 S. Wacker Dr., Suite 2800, Chicago, IL 60606


text:
Q: Pandas data frame column containing list of dicts Hi I have the following pandas data frame:
df = pd.DataFrame({'info':[1.4,3.6,6.5], 'new':[[{'score':0.998, 'letters':'C', 'temp':1}, {'score':1.343, 'letters':'B', 'temp':0}, {'score':2.323, 'letters':'F', 'temp':1}], [{'score':2.532, 'letters':'D', 'temp':1}, {'score':2.123, 'letters':'G', 'temp':1}, {'score':4.332, 'letters':'S', 'temp':0}], [{'score':2.223, 'letters':'C', 'temp':0}, {'score':1.144, 'letters':'J', 'temp':1}, {'score':7.443, 'letters':'G', 'temp':9}]]})

df:
    info    new
0   1.4 [{'score': 0.998, 'letters': 'C', 'temp': 1}, ...
1   3.6 [{'score': 2.532, 'letters': 'D', 'temp': 1}, ...
2   6.5 [{'score': 2.223, 'letters': 'C', 'temp': 0}, ...

I'm trying to get the score values and letters values from each dictionary and get the following output:
  info    score1    score2    score3   letters1   letters2   letters3
0 1.4     0.998     1.343     2.323    C          B          F
1 3.6     2.532     2.123     4.332    D          G          S
2 6.5     2.223     1.144     7.443    C          J          G

I have tried this:
from pandas.io.json import json_normalize
records = [x[0] for x in df['new']]

res = pd.concat([df.drop('new', axis=1), json_normalize(records)], axis=1)

I have also tried:
df = df['new'].apply(lambda x: pd.Series({i['score']: i['letters'] for i in x if isinstance(x, list)}))

Any help would be great

A: Use list with dict comprehension for new columns names with enumerate:
d = [{f'{k}{i}': v for i,y in enumerate(x, 1) for k,v in y.items()} for x in df['new']]

df = pd.DataFrame(d, index=df.index).sort_index(axis=1)
print (df)
  letters1 letters2 letters3  score1  score2  score3  temp1  temp2  temp3
0        C        B        F   0.998   1.343   2.323      1      0      1
1        D        G        S   2.532   2.123   4.332      1      1      0
2        C        J        G   2.223   1.144   7.443      0      1      9

d = [{f'{k}{i}': v for i,y in enumerate(x, 1) for k,v in y.items() if k in ['score','letters']} for x in df.pop('new')]

df = df.join(pd.DataFrame(d, index=df.index).sort_index(axis=1))
print (df)
   info letters1 letters2 letters3  score1  score2  score3
0   1.4        C        B        F   0.998   1.343   2.323
1   3.6        D        G        S   2.532   2.123   4.332
2   6.5        C        J        G   2.223   1.144   7.443

A: Try this one
df = df.explode('new')
#pd.json_normalize(df['new'])
df2 = pd.concat([df['info'].reset_index(drop = True), pd.json_normalize(df['new'])], axis = 1)

explode will take take it out of the list and then normalise the dictionary thereafter

A: *

*explode() and expand columns

*reshape exploded and expanded dataframe and join() back to original

df2 = (
    df.explode("new")["new"]
    .apply(pd.Series)
    .pipe(lambda d: d.assign(obs=d.groupby(level=0).cumcount() + 1))
    .set_index("obs", append=True)
    .unstack("obs")
)

df2.columns = ["".join(map(str, c)) for c in df2.columns.to_flat_index()]
df.loc[:, ["info"]].join(df2)

info
score1
score2
score3
letters1
letters2
letters3
temp1
temp2
temp3

0
1.4
0.998
1.343
2.323
C
B
F
1
0
1

1
3.6
2.532
2.123
4.332
D
G
S
1
1
0

2
6.5
2.223
1.144
7.443
C
J
G
0
1
9

redpajama_set_name: RedPajamaStackExchange