Featured Post

Python map() and lambda() Use Cases and Examples

Image
 In Python, map() and lambda functions are often used together for functional programming. Here are some examples to illustrate how they work. Python map and lambda top use cases 1. Using map() with lambda The map() function applies a given function to all items in an iterable (like a list) and returns a map object (which can be converted to a list). Example: Doubling Numbers numbers = [ 1 , 2 , 3 , 4 , 5 ] doubled = list ( map ( lambda x: x * 2 , numbers)) print (doubled) # Output: [2, 4, 6, 8, 10] 2. Using map() to Convert Data Types Example: Converting Strings to Integers string_numbers = [ "1" , "2" , "3" , "4" , "5" ] integers = list ( map ( lambda x: int (x), string_numbers)) print (integers) # Output: [1, 2, 3, 4, 5] 3. Using map() with Multiple Iterables You can also use map() with more than one iterable. The lambda function can take multiple arguments. Example: Adding Two Lists Element-wise list1 = [ 1 , 2 , 3 ]

Predictive Analytics - A Case Study

Nishad Sharma, a Delhi-based entrepreneur, is a typical online shopper who keeps a tab on the various sales and promotional deals run by e-commerce companies from time to time. On the cool Delhi evening of February 4, he opened online fashion company Myntra's app on his smartphone to see if there were any deals on trousers. That day, Myntra was running its Rush Hour sale in which customers could avail up to 50 per cent discount on select products. After filtering his search, Sharma decided to add a pair of UCB trousers to his shopping cart.


Predictive Analytics

But then he changed his mind. Perhaps he could get a better deal if he logged on into a sale on a weekend. To his surprise, Sharma received a mail from Myntra next morning, telling him what he presumably lost by abandoning his cart the previous day. The same product was now available at a 100 per cent mark-up. To close the sale, the company sent another mail to Sharma a couple of days later, offering a smaller discount of 20 per cent. Sharma couldn't let it go waste a second time round.

The systematic and gentle hounding of Sharma points at a big shift in the way e-commerce players target customers. Says Myntra's chief strategy officer Prasad Kompalli, "Gone are the days of sending irrelevant mail shots to one and all. 


Today we are in a position to identify and reach out to our customers." To make this possible on a large scale, e-commerce firms are sprucing up their predictive analytics skills and the attendant infrastructure to understand who their most valuable customers are.

Predictive analytics factors in all possible variables that help the marketer devise the right strategy to generate the desired engagement with customers - from providing timely and accurate sales forecasting insights, to equipping them with opportunities to improve diagnosis and the design of their websites to accommodate the pressures of any shopping blitzkrieg. 


These insights can range from what time of the day your website can witness maximum traffic, what products/pages will receive high impressions, which region you can expect the bulk of the orders to come from (to help in the planning of logistics and cash on delivery options) and the like.

Read more

Comments

Popular posts from this blog

How to Fix datetime Import Error in Python Quickly

SQL Query: 3 Methods for Calculating Cumulative SUM

Python placeholder '_' Perfect Way to Use it