Tech Insight : Python in Excel … So What?
Following the announcement that Microsoft is releasing a public preview of Python in Excel, we look at what this will mean for Excel users and how it could help businesses.
What Is Python?
The initial version was created in the late 1980s by Guido van Rossum, with its first official release, Python 0.9.0, coming out in February 1991. It was named after the eponymous Monty Python Show, after having been developed as a successor to the ABC language and was intended to be easy to read and allow for concise code, among other goals.
It’s regarded as a good general-purpose programming language that’s relatively easy to learn due to its simple and straightforward syntax. Python is often used in creating web applications and artificial intelligence applications, and it is the language behind platforms like Pinterest and Instagram.
Added To Excel
Last week, Microsoft announced that is releasing a Public Preview of Python in Excel, thereby enabling the combination of Python and Excel analytics within the same workbook, with no setup required. Microsoft says: “With Python in Excel, you can type Python directly into a cell, the Python calculations run in the Microsoft Cloud, and your results are returned to the worksheet, including plots and visualisations.” In short, this means that Excel users will be able to carry out advanced data analysis in the familiar Excel environment, by accessing Python from the Excel ribbon.
Two other key benefits of the integration highlighted by Microsoft are that it runs securely on the Microsoft Cloud, thereby keeping data private, and it is built to work with Teams. This enables colleagues to (seamlessly) interact with and refresh Python in Excel based analytics without needing to worry about installing additional tools, Python runtimes, or managing libraries and dependencies.
What Sort Of Things Can Be Done With The Excel/Python Combination?
Python’s ability to manipulate Excel tables will be of particular help to businesses that frequently work with data because it offers many practical benefits and uses. For example:
– Saving time by automating repetitive tasks in excel, e.g. formatting, or reorganising data.
– Potentially getting better data insights because Python enables the handling of large data sets and can be more efficient in processing and analysing that data.
– Saving time and doing a better job of data cleaning, e.g. Python is better at locating missing values, standardising formats, removing duplicates, and using techniques like regular expressions for pattern-based transformations.
– Improved data analysis and analytics due to the use of Python’s powerful data analysis libraries, e.g. Pandas, Matplotlib, and scikit-learn and the fact that Python in Excel leverages Anaconda (a popular enterprise repository) Distribution for Python running in Azure. This can help with complex calculations, statistical analysis, and data transformations that might be cumbersome or inefficient in Excel.
– Advanced visualisation. I.e., Python charting libraries like Matplotlib and seaborn enabling the creation of a wide variety of charts, spanning from conventional bar graphs and line plots to more specialized visualisations such as heatmaps, violin plots, and swarm plots.
– Helping to focus collaborative work efforts, e.g. where multiple people or systems are providing data in different formats or structures, Python acts as an aggregator, harmonising and consolidating diverse data sources into a single Excel sheet or structure.
– Python scripts can be scheduled to run at specified intervals, thereby making it easier to update or analyse Excel data even when you’re not around.
– Using Python as a bridge to enable Excel data to interact with other web applications, databases, or other external systems.
– Python scripts can be used to create custom functions not natively available in Excel, thereby expanding the scope of what can be done with Excel.
– Python can be used to periodically back up Excel files and even maintain versions (if needed).
– Python libraries like scikit-learn and statsmodels can be leveraged to apply popular machine learning, predictive analytics, and forecasting techniques, e.g. regression analysis, time series modelling, and more.
Examples
Some everyday examples of how using the power of Python in Excel could help businesses include:
– Making monthly sales reports better as well as faster and easier to produce. For example, if a sales manager needs to compile monthly sales reports and receives sales data from multiple regions in different Excel files, a Python script can be written to automatically consolidate all these files into a master report.
– Helping to track the expenses of a small business by using Python to automatically categorise and summarise expenses from an Excel sheet, thereby helping to track where money is being spent most frequently.
– In retail, a store manager could use a Python script to alert them when inventory for a particular item goes below a certain threshold (based on the data in the Excel inventory list).
– Financial analysts could predict future revenue or costs by using Python apply complex forecasting models on past financial data in Excel.
– In accounts, if a business needs to generate bulk invoices, Python can be used to save time by pulling data from an Excel sheet (like client details and amounts) and produce individual invoice files for each client.
– A business with critical data in Excel can have Python scripts scheduled to automatically back up these files at regular intervals, thereby ensuring data safety.
Other examples of what businesses can use Python scripts in combination with Excel include employee scheduling, e.g. generating shift schedules, quickly analysing any customer feedback collected in Excel, automatically highlighting best prices collected in Excel from different vendors, calculating commission for sales staff from figures collected in Excel, and analysing supplier delivery performance, e.g. delivery date and time records held in Excel.
What Does This Mean For Your Business?
In short, releasing Python in Excel enables businesses (that leverage the integration) to effectively ‘supercharge’ their data processing and analysis capabilities, thereby giving them the ability to handle more complex tasks, larger data sets, and integrate with a broader range of technologies.
This could improve productivity, competitiveness, give new insights and reveal new business opportunities, save time, and produce better quality reports and visualisations which can improve transparency and business decision making. The fact(s) that Python in Excel doesn’t require any setup, integrates seamlessly with Teams, plus works securely in the cloud must surely also be attractive to businesses, many of whom now have remote and flexible working (all Teams users have access and security worries are minimised). Most businesses must, however, wait a little longer to start using the power of Python in Excel because it’s currently only available to users running Beta Channel on Windows and Microsoft 365 Insider Program members, although it will start to roll out with build 16.0.16818.20000, and then to the other platforms at a later date.
Tech News : Google Flights Can Show Cheapest Times To Book
With last-minute holidays on people’s minds (as well as current delays and disruption) Google has announced a new money-saving feature for Google Flights which shows users the cheapest time to book.
What Is Google Flights?
Google Flights, introduced back in 2011, is Google’s online flight booking search service which allows users to search for airline fares, book flights, and compare different flight and ticketing options. The service works by aggregating data from multiple airlines, booking agencies, and other online flight services and redirects customers to the airline’s website or a third-party booking site to complete the purchase.
New Feature
Google says the new feature offers users an upgraded insight to help answer the question “Is it better to book now or wait for lower prices to come along?” As a supplement to Google Travel’s existing price tracking alerts and price guarantee option, the new feature can show users when prices have typically been lowest to book their chosen dates and destination (for searches with reliable trend data).
For example, the new insights feature can tell users that the cheapest time to book similar trips is usually two months before departure, and if they’re currently in that “sweet spot.” Also, for example, the new feature could show users that prices for a particular destination usually drop closer to take-off, which means users can see that that they could benefit by waiting before booking.
In short, the insights offered by the new feature could help Google Travel users save money and can make a decision with a greater sense of confidence, based on information they didn’t have before. This could also save users time in shopping around and hassle in deliberating.
Adds To The Other Money-Saving Features
The new money saving insights supplement the existing ones on Google Travel, including:
– The ‘Price Tracking’ feature, introduced in 2017, which enables users to set up tracking for flights on specific dates so they can be automatically notified if flight prices drop significantly. Also, users can set price tracking for “Any dates” to receive emails about deals anytime in the next three to six months.
– The ‘Price Guarantee’ badge feature, introduced in April this year, and part of a US pilot, which marks some flight results with a price guarantee badge, indicating that Google Travel is “especially confident” that the price shown won’t get any lower before departure. When users book a flight marked with the guarantee badge, Google Travel monitors the price every day before take-off, and if the price does go down, users are paid the difference via Google Pay.
What Does This Mean For Your Business?
Flight prices in the UK have increased a massive18 per cent (Kayak) from last year, partly due to rising oil prices, rising fuel import prices due to the war in Ukraine, rising maintenance costs and more, making it much more difficult to find cheap flights. Coupled with a cost of living crisis, this has made it more important than ever for consumers to shop around. However, people now have access to more price comparison services to help. For example, Google Travel has many flight comparison competitors in the UK, arguably better known than Google’s service, such as Expedia, TravelSupermarket, Opodo, Lastminute.com, Booking.com, Sky Scanner, Kayak, Cheapflights, and more. The existing price-related features and new price insight feature for Google Travel are, therefore, both likely to be helpful to consumers and companies offering lower flights as well as helping Google to compete in a busy market where Google has many strong competitors in different countries.
Insights like these are a way to add value and tie-in with the Google Travel’s existing advantages, e.g. a clean/easy interface, integration with its other services (the globally popular Google Maps app), speed, no booking fees and reliability, and give Google a leg-up. Google also has the advantage of having access to a lot of data about what travel customers are searching for and trends, and being major player in the AI world, so these new features (and likely more to come), can draw upon Google’s existing assets and strengths to keep Google Travel competitive.
Tech News : Opting Out Of AI-Targeting
The EU’s new Digital Services Act allows social media users to opt out of AI personalised content feeds based on relevance.
What Is The DSA?
The Digital Services Act is a new EU Law designed to protect users. It applies to any digital company operating and serving the EU with “very large online platforms” (those with over 45 million EU users) and very large search engines subject to the toughest rules.
The DSA focuses on five key areas of user protection which are:
1. Illegal products. I.e. platforms will need to stop the sale of illegal products.
2. Illegal content. This means that platforms (e.g. social media platforms) need to take measures stop hate speech, child abuse and harassment, electoral interference and more, whilst safeguarding free speech and data protection.
3. Protection of children. This includes large online platforms and search engines having to take a wide range of measures to protect children, such as protection from being targeted with advertising based on their personal data or cookies, protecting their privacy, redesigning content “recommender systems” to reduce risks to children, and much more.
4. Racial and gender diversity. This means that companies (e.g. the large social media platforms) can’t target users with adverts based on personal date such as race, gender, and religion.
5. Banning so-called “dark patterns.” This means protecting consumers from manipulative practices designed to exploit their vulnerabilities or trick/manipulate them into buying things they don’t need or want and making it difficult for them to cancel. For example, this includes fake timers on deals, hiding information about signing up to a subscription and making subscription cancellation steps too complicated for users.
User Empowerment
More on the matter of user empowerment, the DSA means that users (e.g. users of social media platforms) now need to be given clear information on why they are recommended certain information and have the right (and a clear way) to opt-out from recommendation systems based on profiling (tracking). This has led to the large social media platforms making changes. For example:
– Meta’s Facebook launching a chronological news Feeds tab (last July) to whereby users can see posts from their friends, groups, pages and more in chronological order, and no longer showing any “Suggested For You” posts. Also, since February, Meta’s apps, including Facebook, have stopped showing ads to users aged 13-17 based on their activity to the apps.
– Google’s YouTube stopping next video recommendations based on profiling for logged in users with the ‘watch history’ feature turned off.
– Instagram introducing a “Not Personalised” option instead of just an ‘Explore’ tab based on algorithmic content selections (personalised – “For you”).
– TikTok rolling out the option for users in Europe opt out from its personalised algorithm-based feed, i.e. as TikTok says, if users opt out of “For You” and “LIVE” feeds, it will instead show “popular videos from both the places where they live and around the world, rather than recommending content to them based on their personal interests”. Also, from July, TikTok stopped showing users in Europe aged 13-17 from being shown personalised ads based on their online activity.
– Snapchat has announced four new measures that it’s taking in the EU to comply with the DSA, including giving users “the ability to better understand why content is being shown to them and have the ability to opt out of a personalised Discover and Spotlight content experience.”
Amazon and Google
With the DSA also affecting very large search engines and companies like Amazon, a couple of examples of how they are complying include:
– Amazon creating a new channel for submitting notices against suspected illegal products and content.
– Google promising to increase data access to increase transparency, helping users to understand more about how Google Search, YouTube, Google Maps, Google Play, and Shopping work.
What Does This Mean For Your Business?
Tech companies have known about the basic requirements of the DSA for three years and have had four months to comply with the act’s rules. Given the size of the “very large” social media companies and search engines, however, it has required some considerable work (some claiming thousands of staff had been involved), costs, and rethinking and re-organising. The DSA’s rules are far-reaching, while compliance means increased operational costs, e.g. due to necessary investment in technical infrastructure, legal fees, human resources for content moderation, and data governance systems. Also, the stricter regulations on data collection, content, and restrictions on targeting could limit ad-revenues and user-engagement. There’s also the added challenge of a greater workload for social media companies – e.g., with the need for more effective and continuous monitoring, user outreach, and updates.
That said, users may welcome the chance to essentially opt-out of being targeted and many may say that giving greater protection to users, especially children, is long overdue and that legislation appears to have been necessary to make change happen. For the very large tech companies, although they may not be happy with parts of the DSA, they have recognised that compliance is now crucial for sustained market access and legal operation within the EU and the fines for non-compliance are very steep and something (along with the bad publicity) they’d like to avoid (6% of turnover and potential costly suspension of the service).
The new rules have only just come into force, so it remains to be seen how the large tech companies fare going forward in a fast-evolving tech landscape that now has the added complications of AI.
Sustainability-in-Tech : World’s First “Superfast Charging” EV Battery
China’s Contemporary Amperex Technology Limited (CATL) has announced the launch of world’s first 4C superfast charging LFP battery.
The ‘Shenxing’ EV Battery
CATL says the ‘Shenxing’ battery can deliver 400 km of driving range from a 10-minute charge as well as a range of over 700 km on a single full charge, which is around 60 per cent further than the average electric vehicle (EV) on full charge in 2023.
The company says the Shenxing battery will “considerably alleviate fast charging anxiety for EV users” and “opens up an era of EV superfast charging”.
How It Beats “Fast Charging Anxiety”
The company, which manufactured more lithium-ion batteries than any of its competitors last year, says that fast charging anxiety is the top factor that stops consumers from shifting to EVs. CATL says that its Shenxing battery “redefines” Lithium Iron Phosphate (LFP) batteries and alleviates “fast charging anxiety” because:
– It leverages super electronic network cathode technology and fully nano-crystallised LFP cathode materials to create a super-electronic network, which facilitates the fast extraction of lithium ions and the rapid response to charging signals.
– CATL’s latest second-generation fast ion ring technology has been used to modify the properties of the battery’s graphite surface, thereby increasing intercalation channels (improving energy density) and shortens the intercalation distance for lithium ions. This creates a kind of “expressway” for current conduction.
– Its multi-gradient layered electrode design has been developed to strike a perfect balance between fast charging and long range.
– CATL’s new superconducting electrolyte formula effectively reduces the viscosity of the electrolyte, resulting in improved conductivity within the battery.
– The improved, ultra-thin SEI film (a passivation layer on the anode surface, inhibiting electrolyte decomposition) reduces resistance of lithium-ion movement, thereby improving the transmission rate of lithium ions and decreasing the resistance of lithium-ion movement.
Better Overall Battery Performance
CATL says that new Shenxing battery’s features, as listed above, improves its overall performance in addition to its super-fast charging, because the Shenxing battery also has a longer driving range, fast charging over a wide range of temperatures, and a high level of safety thanks to structure innovation and leveraging intelligent algorithms. For example:
– The use of CATL’s “trailblazing all-in-one grouping technology,” is a key reason why the Shenxing battery can reach a range of over 700 km, pushing the limits of the performance of LFP chemistry.
– CATL’s cell temperature control technology means the Shenxing battery can charge as normal even at low temperatures. For example, Shenxing can charge to 80 per cent SOC in 10 minutes at room temperature, and from 0-80 per cent in just 30 minutes in temperature as low as -10°C.
– CATL say the Shenxing battery’s upgraded electrolyte and the separator with a highly safe coating, combined with its intelligent algorithms, provide it with a “real-time fault testing system” that can solve the problems brought about by fast refuelling, thereby giving the battery a high level of safety.
EV Batteries
Although CATL identifies “fast charging anxiety” as the biggest obstacle preventing more people from buying electric vehicles, battery technology has long been a real (physical) challenge to how far electric cars are able to travel on a charge. However, many buyers would also argue that there are many other ‘anxieties’ about EVs that are holding back EV sales such as the price of EVs (especially during a cost-of-living-crisis), and the availability of charging points (charging infrastructure).
There was some good news for the UK last month when Tata, the owner of Jaguar Land Rover (JLR), confirmed it will be building a £4 billion EV battery factory (termed a ‘gigafactory’) at Bridgwater in Somerset. As well as providing jobs and giving the UK more of foothold in the EV industry, it will also help the UK by delivering half of the battery production needed by 2030 (in the UK, 2030 will see a ban on the sale of new cars using petrol or diesel).
Which Car Companies?
Although it was reported three years ago that CATL had developed a battery that could power an EV for 1.2 million miles over a 16-year lifespan and that deals may have been in place to supply Tesla, BMW, Daimler, Honda, Toyota, Volkswagen, and Volvo, it is not clear from its latest more detailed announcement about the Shenxing battery’ which car manufacturers will be the first to use the new battery.
Record Breaking EV Sales In Recent Times
Even with the battery challenges, EVs are two or three times more efficient than conventional petrol/diesel-powered vehicles, plus they have the added benefit of having zero emissions (during driving). Major carmakers have already committed to making EVs and phasing out cars with internal combustion engines entirely by 2040, and it’s predicted (IEA) that electric car sales could overtake fossil fuel-powered car sales within the next 15 years. However, the hope is that breakthroughs in battery technology could make this happen faster which is good news for governments looking to hit carbon emissions targets and deadlines for phasing out fossil fuel vehicles.
What Does This Mean For Your Business?
EV battery technology development and how it affects factors like speed-of-charging, range, battery weight, cost (and more) are factors which affect the wider adoption of EVs. The superfast charging and long range (700 km on a full charge) of CATL’s Shenxing battery appear to tackle two of the major challenges, although there are still many more, including charging infrastructure and EV prices.
However, if deals are successfully made with major manufacturers to use the battery and are they’re able to communicate the benefits to the car buying public, this could be one element that could speed up the uptake of EV ownership and the many benefits that brings (e.g. environmental / climate) and giving a better chance of hitting carbon reduction targets.
As mentioned, there are number of challenges that need to be met to make conditions better to enable larger sales of EVs, but this new battery technology could be an important step in the right direction.
Tech-Trivia : Did You Know? This Week in Tech-History …
Ancient Data-Disasters
So far in 2023, Canada’s had wildfires devouring over 30 million acres, an expanse comparable to Kentucky. This has already surpassed Canada’s earlier record set in 1989, where flames ravaged more than 18 million acres.
As the wildfire-season isn’t over yet, using the 1989 figures (much less than 2023) 18 million acres could yield in the order of 18 billion trees, assuming a thousand trees per acre. A typical pine tree, measuring approximately 45 feet in usable trunk length and eight inches in diameter, is believed to yield about 10,000 sheets of A4 paper, i.e., the 1989 Canadian wildfires possibly burned around 180 trillion sheets of A4 paper – enough to cover up the whole of Europe or stock the ancient Library of Alexandria 30 billion times over! The exact number of scrolls the Library of Alexandria contained isn’t definitively known and varies across historical sources, so it was assumed the library held 500,000 scrolls (estimates can range anywhere from 40,000 to over a million). It was also assumed that one scroll is equivalent to 10 sheets of A4 paper, for simplicity.
When the ancient Library of Alexandria was burned down (the second time), it wasn’t due to climate change but because Julius Caesar fancied Cleopatra and when he became involved in the internal conflict between her and Ptolemy XIII, he ignited the ships at the port of Alexandria and it’s speculated that this blaze extended to the library, leading to its total devastation.
It wasn’t the only time a Roman leader burned down the library because another section of the library was housed within a temple devoted to the deity Serapis. In 391 CE, under the edict of Roman Emperor Theodosius, Christianity was proclaimed the sole permitted religion of Rome, leading to the demolition of all pagan temples. Consequently, the Serapis temple in Alexandria was razed, resulting in the loss of the library’s secondary branch (talk about single-minded).
It’s believed by historians that the Library of Alexandria once contained more than half a million documents sourced from regions like Assyria, Greece, Persia, Egypt, India, among others. While gauging the storage for images remains challenging, the textual contents of this vast library could feasibly fit on a 16Gb USB drive.
Whilst this ancient information-storage is impressive, it pales into insignificance when compared to the amount of worldwide information being produced daily. This amount of information is growing geometrically and inexorably as this page and image (c/o Statistica) shows : https://www.statista.com/
The next time you see a humble USB-stick, consider all the trees/wood/paper/books it could back-up and spare a thought for how the ancient librarians must have felt after the fires without an effective disaster-recovery policy!
Tech Tip – Time Travel In Google
If you’d like to see, or remind yourself of what Google’s search engine was like back in 1998 when it started, here’s a fun, instant way to do just that:
Type ‘Google in 1998’ into Google’s search bar.
Google will immediately adopt the old look, complete with the logo + exclamation mark.
To change it back, click on the “Take me back to the present,” or conduct a search using the old search box at the top.