Jupyter Notebook Pivot Functions

Published Feb 23 2021 10:19 AM 1,668 Views
Microsoft

We recently released a new version of MSTICPy with a feature called Pivot functions.

This feature has three main goals:

  • Making it easy to discover and invoke MSTICPy functionality.
  • Creating a standardized way to call pivotable functions.
  • Letting you assemble multiple functions into re-usable pipelines.

The pivot functionality exposes operations relevant to a particular entity as methods (or functions) of that entity. These operations include:

  • Data queries
  • Threat intelligence lookups
  • Other data lookups such as geo-location or domain resolution
  • and other local functionality

Here are a couple of examples showing calling different kinds of enrichment functions from the IpAddress entity:

>>> from msticpy.datamodel.entities import IpAddress, Host    
>>> IpAddress.util.ip_type(ip_str="157.53.1.1"))
    ip          result    157.53.1.1  Public    
>>> IpAddress.util.whois("157.53.1.1"))
    asn  asn_cidr  asn_country_code  asn_date    asn_description  asn_registry  nets .....   
    NA   NA        US                2015-04-01  NA               arin          [{'cidr': '157.53.0.0/16'...     >>> IpAddress.util.geoloc_mm(value="157.53.1.1"))    CountryCode  CountryName    State   City   Longitude   Latitude   Asn...    US           United States  None    None   -97.822     37.751     None...

This second example shows a pivot function that does a data query for host logon events from a Host entity.

>>> Host.AzureSentinel.list_host_logons(host_name="VictimPc")
    Account               EventID   TimeGenerated                      Computer                 SubjectUserName   SubjectDomainName
    NT AUTHORITY\SYSTEM  4624     2020-10-01 22:39:36.987000+00:00   VictimPc.Contoso.Azure   VictimPc$         CONTOSO

You can also add other functions from 3rd party Python packages or ones you write yourself as pivot functions.

 

Terminology

Before we get into things let's clear up a few terms.

 

Entities - These are Python classes that represent real-world objects commonly encountered in CyberSec investigations and hunting. E.g., Host, URL, IP Address, Account, etc.

 

Pivoting - This comes from the common practice in CyberSec investigations of navigating from one suspect entity to another. E.g., you might start with an alert identifying a potentially malicious IP Address, from there you 'pivot' to see which hosts or accounts were communicating with that address. From there you might pivot again to look at processes running on the host or Office activity for the account.

 

Background reading

This article is available in Notebook form so that you can try out the examples. [TODO]

There is also full documentation of the Pivot functionality on our ReadtheDocs page.

 

Life before pivot functions

 

Before Pivot functions your ability to use the various bits of functionality in MSTICPy was always bounded by your knowledge of where a certain function was (or your enthusiasm for reading the docs).

For example, suppose you had an IP address that you wanted to do some simple enrichment on.

ip_addr = "20.72.193.242"

First, you'd need to locate and import the functions. There might also be (as in the GeoIPLiteLookup class) some initialization step you'd need to do before using the functionality.

from msticpy.sectools.ip_utils import get_ip_type
from msticpy.sectools.ip_utils import get_whois_info
from msticpy.sectools.geoip import GeoLiteLookup
geoip = GeoLiteLookup()

 

Next you might have to check the help for each function to work it parameters.

>>> help(get_ip_type)
Help on function get_ip_type in module msticpy.sectools.ip_utils: 
get_ip_type(ip: str = None, ip_str: str = None) -> str   
Validate value is an IP address and deteremine IPType category.        ... 

Then finally run the functions.

>>> get_ip_type(ip_addr)
'Public'
>>> get_whois_info(ip_addr)
('MICROSOFT-CORP-MSN-AS-BLOCK, US',
{'nir': None,  'asn_registry': 'arin',  'asn': '8075',  'asn_cidr': '20.64.0.0/10',  'asn_country_code': 'US',  'asn_date': '2017-10-18',  'asn_description': 'MICROSOFT-CORP-MSN-AS-BLOCK, US',  'query': '20.72.193.242',  'nets': ...
>>> geoip.lookup_ip(ip_addr)
([{'continent':
{'code': 'NA',    'geoname_id': 6255149,    'names':
{'de': 'Nordamerika',     'en': 'North America',     'es': 'Norteamérica',     'fr': 'Amérique du Nord',     'ja': '北アメリカ',     'pt-BR': 'América do Norte',     'ru': 'Северная Америка',     'zh-CN': '北美洲'}},   'country': {'geoname_id': 6252001,    'iso_code': 'US',    'names': {'de': 'USA',     'en': 'United States',     'es': 'Estados Unidos',     ...

At which point you'd discover that the output from each function was somewhat raw and it would take a bit more work if you wanted to combine it in any way (say in a single table).

 

In the rest of the article we'll show you how Pivot functions make it easier to discover data and enrichment functions. We'll also show how pivot functions bring standardization and handle different types of input (including lists and DataFrames) and finally, how the standardized output lets you chain multiple pivot functions together into re-usable pipelines of functionality.

 

Getting started with pivot functions

 

Let's get started with how to use Pivot functions.

Typically, we use MSTICPy's init_notebook function at the start of any notebook. This handles checking versions and importing some commonly-used packages and modules (both MSTICPy and 3rd party packages like pandas).

>>> from msticpy.nbtools.nbinit import init_notebook
>>>
init_notebook(namespace=globals());
Processing imports........

 

Then there are a couple of preliminary steps needed before you can use pivot functions. The main one is loading the Pivot class.

 

Pivot functions are added to the entities dynamically by the Pivot class. The Pivot class will try to discover relevant functions from queries, Threat Intel providers and various utility functions.

 

In some cases, notably data queries, the data query functions are themselves created dynamically, so these need to be loaded before you create the Pivot class. (You can always create a new instance of this class, which forces re-discovery, so don't worry if mess up the order of things).

 

Note in most cases we don't need to connect/authenticate to a data provider prior to loading Pivot.

 

Let's load our data query provider for AzureSentinel.

>>> az_provider = QueryProvider("AzureSentinel")
Please wait. Loading Kqlmagic extension...

 

Now we can load and instantiate the Pivot class.

>>> from msticpy.datamodel.pivot import Pivot
>>> pivot = Pivot(namespace=globals())

Why do we need to pass "namespace=globals()"? 

Pivot searches through the current objects defined in the Python/notebook namespace to find provider objects that it will use to create the pivot functions. This is most relevant for QueryProviders - when you create a Pivot class instance it will find and use the relevant queries from the az_provider object that we created in the previous step. In most other cases (like GeoIP and ThreatIntel providers, it will create new ones if it can't find existing ones).

 

Easy discovery of functionality

 

Find the entity name you need

The simplest way to do this is simply enumerate (using Python dir() function) the contents of the MSTICPy entities sub-package. This should have already been imported by the init_notebook function that we ran earlier.

The items at the beginning of the list with proper capitalization are the entities.

>>> dir(entities)
['Account', 'Alert', 'Algorithm', 'AzureResource', 'CloudApplication', 'Dns', 'ElevationToken', 'Entity', 'File', 'FileHash', 'GeoLocation', 'Host', 'HostLogonSession', 'IpAddress', 'Malware', ...

 

We're going to make this a little more elegant in a forthcoming update with this helper function.

>>> entities.find_entity("ip")
Match found 'IpAddress'msticpy.datamodel.entities.ip_address.IpAddress

Listing pivot functions available for an entity

Note you can always address an entity using its qualified path, e.g. "entities.IpAddress" but if you are going to use one or two entities a lot, it will save a bit of typing if you import them explicitly.

>>> from msticpy.datamodel.entities import IpAddress, Host

 

Once you have the entity loaded, you can use the get_pivot_list() function to see which pivot functions are available for it. The example below has been abbreviated for space reasons.

>>> IpAddress.get_pivot_list()
['AzureSentinel.SecurityAlert_list_alerts_for_ip',
'AzureSentinel.SigninLogs_list_aad_signins_for_ip',
'AzureSentinel.AzureActivity_list_azure_activity_for_ip',
'AzureSentinel.AzureNetworkAnalytics_CL_list_azure_network_flows_by_ip',
...
'ti.lookup_ip',
'ti.lookup_ipv4',
'ti.lookup_ipv4_OTX',
...
'ti.lookup_ipv6_OTX',
'util.whois',
'util.ip_type',
'util.ip_rev_resolve',
'util.geoloc_mm',
'util.geoloc_ips']

 

Some of the function names are a little unwieldy but, in many cases, this is necessary to avoid name collisions. You will notice from the list that the functions are grouped into containers: "AzureSentinel", "ti" and "util" in the above example.

 

Although this makes the function name even longer, we thought that this helped to keep related functionality together - so you don't get a TI lookup function, when you thought you were running a query.

Fortunately, Jupyter notebooks/IPython support tab completion so you should not normally have to remember these names.

Tab-Completion.png

 

 

The containers ("AzureSentinel", "util", etc.) are also callable functions - they just return the list of functions they contain.

>>> IpAddress.util()
whois functionip_type functionip_rev_resolve functiongeoloc_mm functiongeoloc_ips function

Now we're ready to run any of the functions for this entity (we take the same initial examples from the "Life before pivot functions" plus a few more).

 

>>> IpAddress.util.ip_type(ip_addr)
 

ip

result

0

20.72.193.242

Public

 

>>> IpAddress.util.whois(ip_addr)
 

asn

asn_cidr

asn_country_code

asn_date

asn_description

asn_registry

nets

0

8075

20.64.0.0/10

US

2017-10-18

MICROSOFT-CORP-MSN-AS-BLOCK, US

arin

[{'cidr': '20.128.0.0/16, 20.48, ...

 

>>> IpAddress.util.ip_rev_resolve(ip_addr)
 

qname

rdtype

response

ip_address

0

20.72.193.242

PTR

The DNS query name does not exist: 20.72.193.242.

20.72.193.242

 

>>> IpAddress.util.geoloc_mm(ip_addr)
 

CountryCode

CountryName

State

City

Longitude

Latitude

Asn

edges

Type

AdditionalData

IpAddress

0

US

United States

Washington

None

-122.3412

47.6032

None

{}

geolocation

{}

20.72.193.242

 

>>> IpAddress.ti.lookup_ip(ip_addr)
 

Ioc

IocType

SafeIoc

QuerySubtype

Provider

Result

Severity

Details

0

20.72.193.242

ipv4

20.72.193.242

None

Tor

True

information

Not found.

0

20.72.193.242

ipv4

20.72.193.242

None

VirusTotal

True

unknown

{'verbose_msg': 'Missing IP address', 'response_code': 0}

0

20.72.193.242

ipv4

20.72.193.242

None

XForce

True

warning

{'score': 1, 'cats': {}, 'categoryDescriptions': {}, 'reason': 'Regional Internet Registry', 're...

 

Notice that we didn't need to worry about either the parameter name or format (more on this in the next section). Also, whatever the function, the output is always returned as a pandas DataFrame.

 

For Data query functions you do need to worry about the parameter name

Data query functions are slightly more complex than most other functions and specifically often support many parameters. Rather than try to guess which parameter you meant, we require you to be explicit about it.

Before we can use a data query, we need to authenticate to the provider.

 

>>> az_provider.connect(WorkspaceConfig(workspace="CyberSecuritySoc").code_connect_str)

 

If you are not sure of the parameters required by the query you can use the built-in help

 

>>> Host.AzureSentinel.SecurityAlert_list_related_alerts?
Signature: Host.AzureSentinel.SecurityAlert_list_related_alerts(*args, **kwargs) -> Union[pandas.core.frame.DataFrame, Any]
Docstring:
Retrieves list of alerts with a common host, account or process
Parameters
----------
account_name: str (optional)
    The account name to find
add_query_items: str (optional)
    Additional query clauses
end: datetime (optional)
    Query end time
host_name: str (optional)
    The hostname to find
path_separator: str (optional)
    Path separator    (default value is: \\)
process_name: str (optional) ...

In this case we want the "host_name" parameter.

>>> Host.AzureSentinel.SecurityAlert_list_related_alerts(host_name="victim00").head(5)

 

 

TenantId

TimeGenerated

AlertDisplayName

AlertName

Severity

Description

ProviderName

VendorName

VendorOriginalId

SystemAlertId

ResourceId

SourceComputerId

AlertType

ConfidenceLevel

ConfidenceScore

IsIncident

StartTimeUtc

EndTimeUtc

ProcessingEndTime

RemediationSteps

ExtendedProperties

Entities

SourceSystem

WorkspaceSubscriptionId

WorkspaceResourceGroup

ExtendedLinks

ProductName

ProductComponentName

AlertLink

Status

CompromisedEntity

Tactics

Type

Computer

src_hostname

src_accountname

src_procname

host_match

acct_match

proc_match

0

8ecf8077-cf51-4820-aadd-14040956f35d

2020-12-10 09:10:08+00:00

Suspected credential theft activity

Suspected credential theft activity

Medium

This program exhibits suspect characteristics potentially associated with credential theft. Onc...

MDATP

Microsoft

da637426874826633442_-1480645585

a429998b-8a1f-a69c-f2b8-24dedde31c2d

   

WindowsDefenderAtp

 

NaN

False

2020-12-04 14:00:00+00:00

2020-12-04 14:00:00+00:00

2020-12-10 09:10:08+00:00

[\r\n "1. Make sure the machine is completely updated and all your software has the latest patc...

{\r\n "MicrosoftDefenderAtp.Category": "CredentialAccess",\r\n "MicrosoftDefenderAtp.Investiga...

[\r\n {\r\n "$id": "4",\r\n "DnsDomain": "na.contosohotels.com",\r\n "HostName": "vict...

Detection

     

Microsoft Defender Advanced Threat Protection

 

https://securitycenter.microsoft.com/alert/da637426874826633442_-1480645585

New

victim00.na.contosohotels.com

CredentialAccess

SecurityAlert

victim00

victim00

   

True

False

False

1

8ecf8077-cf51-4820-aadd-14040956f35d

2020-12-10 09:10:08+00:00

'Mimikatz' hacktool was detected

'Mimikatz' hacktool was detected

Low

Readily available tools, such as hacking programs, can be used by unauthorized individuals to sp...

MDATP

Microsoft

da637426874826014018_-1390662053

edb68e6d-012d-4c6b-7408-20e679fb41c8

   

WindowsDefenderAv

 

NaN

False

2020-12-04 14:00:01+00:00

2020-12-04 14:00:01+00:00

2020-12-10 09:10:08+00:00

[\r\n "1. Make sure the machine is completely updated and all your software has the latest patc...

{\r\n "MicrosoftDefenderAtp.Category": "Malware",\r\n "MicrosoftDefenderAtp.InvestigationId": ...

[\r\n {\r\n "$id": "4",\r\n "DnsDomain": "na.contosohotels.com",\r\n "HostName": "vict...

Detection

     

Microsoft Defender Advanced Threat Protection

 

https://securitycenter.microsoft.com/alert/da637426874826014018_-1390662053

New

victim00.na.contosohotels.com

Unknown

SecurityAlert

victim00

victim00

   

True

False

False

2

8ecf8077-cf51-4820-aadd-14040956f35d

2020-12-10 09:10:08+00:00

Malicious credential theft tool execution detected

Malicious credential theft tool execution detected

High

A known credential theft tool execution command line was detected.\nEither the process itself or...

MDATP

Microsoft

da637426874824572229_-192666782

39912e77-045b-a082-a91e-8a18958d1b1c

   

WindowsDefenderAtp

 

NaN

False

2020-12-04 14:00:00+00:00

2020-12-04 14:00:00+00:00

2020-12-10 09:10:08+00:00

[\r\n "1. Make sure the machine is completely updated and all your software has the latest patc...

{\r\n "MicrosoftDefenderAtp.Category": "CredentialAccess",\r\n "MicrosoftDefenderAtp.Investiga...

[\r\n {\r\n "$id": "4",\r\n "DnsDomain": "na.contosohotels.com",\r\n "HostName": "vict...

Detection

     

Microsoft Defender Advanced Threat Protection

 

https://securitycenter.microsoft.com/alert/da637426874824572229_-192666782

New

victim00.na.contosohotels.com

CredentialAccess

SecurityAlert

victim00

victim00

   

True

False

False

 

Shown below is a preview of a notebook tool that lets you browser around entities and their pivot functions, search for a function by keyword and view the help for that function. This is going to be released shortly.

 

>>> Pivot.browse()

PivotBrowser.png

 

 

Standardized way of calling Pivot functions

 

Due to various factors (historical, underlying data, developer laziness and forgetfulness, etc.) the functionality in MSTICPy can be inconsistent in the way it uses input parameters.

Also, many functions will only accept inputs as a single value, or a list or a DataFrame or some unpredictable combination of these.

Pivot functions allow you to largely forget about this - you can use the same function whether you have:

  • a single value
  • a list of values (or any Python iterable, such as a tuple or even a generator function) 
  • a DataFrame with the input value in one of the columns.

Let's take an example.

 

Suppose we have a set of IP addresses pasted from somewhere that we want to use as input.

We need to convert this into a Python data object of some sort.

 

To do this we can use another Pivot utility %%txt2df. This is a Jupyter/IPython magic function - to use it, just paste you data in a cell that you want to import into an empty. Use

 %%txt2df --help

in an empty cell to see the full syntax.

In the example below, we specify a comma separator, that the data has a headers row and to save the converted data as a DataFrame named "ip_df".

 

Warning if you specify the "--name" parameter, this will overwrite any existing variable of this name.

 

%%txt2df --sep , --headers --name ip_df
idx, ip, type
0, 172.217.15.99, Public
1, 40.85.232.64, Public
2, 20.38.98.100, Public
3, 23.96.64.84, Public
4, 65.55.44.108, Public
5, 131.107.147.209, Public
6, 10.0.3.4, Private
7, 10.0.3.5, Private
8, 13.82.152.48, Public
 

idx

ip

type

0

0

172.217.15.99

Public

1

1

40.85.232.64

Public

2

2

20.38.98.100

Public

3

3

23.96.64.84

Public

4

4

65.55.44.108

Public

5

5

131.107.147.209

Public

6

6

10.0.3.4

Private

7

7

10.0.3.5

Private

8

8

13.82.152.48

Public

 

For demonstration purposes, we'll also create a standard Python list from the "ip" column of the DataFrame.

 

>>> ip_list = list(ip_df.ip)
>>> print(ip_list)
['172.217.15.99', '40.85.232.64', '20.38.98.100', '23.96.64.84', '65.55.44.108', '131.107.147.209', '10.0.3.4', '10.0.3.5', '13.82.152.48']

 

How did this work before?

If you recall the earlier example of get_ip_type, passing it a list or DataFrame doesn't result in anything useful.

>>> get_ip_type(ip_list)
['172.217.15.99', '40.85.232.64', '20.38.98.100', '23.96.64.84', '65.55.44.108', '131.107.147.209', '10.0.3.4', '10.0.3.5', '13.82.152.48']
does not appear to be an IPv4 or IPv6 address
'Unspecified'

 

Pivot versions are (somewhat) agnostic to input data format

However, the "pivotized" version can accept and correctly process a list.

 

>>> IpAddress.util.ip_type(ip_list)
 

ip

result

0

172.217.15.99

Public

1

40.85.232.64

Public

2

20.38.98.100

Public

3

23.96.64.84

Public

4

65.55.44.108

Public

5

131.107.147.209

Public

6

10.0.3.4

Private

7

10.0.3.5

Private

8

13.82.152.48

Public

 

In the case of a DataFrame, we have to tell the function the name of the column that contains the input data.

 

>>> IpAddress.util.whois(ip_df)  # won't work!
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-32-debf57d805c7> in <module>
...
173         input_df, input_column, param_dict = _create_input_df(
--> 174             input_value, pivot_reg, parent_kwargs=kwargs
   175         )
...
KeyError: ("'ip_column' is not in the input dataframe",
'Please specify the column when calling the function.
You can use one of the parameter names for this:', ['column', 'input_column', 'input_col', 'src_column', 'src_col'])

 

>>> entities.IpAddress.util.whois(ip_df, column="ip")  # correct

nir

asn_registry

asn

asn_cidr

asn_country_code

asn_date

asn_description

query

nets

NaN

arin

15169

172.217.15.0/24

US

2012-04-16

GOOGLE, US

172.217.15.99

[{'cidr': '172.217.0.0/16', 'name': 'GOOGLE', 'handle': 'NET-172-217-0-0-1', 'range': '172.217.0...

NaN

arin

8075

40.80.0.0/12

US

2015-02-23

MICROSOFT-CORP-MSN-AS-BLOCK, US

40.85.232.64

[{'cidr': '40.80.0.0/12, 40.124.0.0/16, 40.125.0.0/17, 40.74.0.0/15, 40.120.0.0/14, 40.76.0.0/14...

NaN

NaN

NaN

NaN

NaN

NaN

NaN

NaN

NaN

NaN

NaN

NaN

NaN

NaN

NaN

NaN

NaN

NaN

 

Note: for most functions you can ignore the parameter name and just specify it as a positional parameter. You can also use the original parameter name of the underlying function or the placeholder name "value".

 

The following are all equivalent:

>>> IpAddress.util.ip_type(ip_list)
>>> IpAddress.util.ip_type(ip_str=ip_list)
>>> IpAddress.util.ip_type(value=ip_list)
>>> IpAddress.util.ip_type(data=ip_list)

When passing both a DataFrame and column name use:

>>> IpAddress.util.ip_type(data=ip_df, column="col_name")

You can also pass an entity instance of an entity as a input parameter. The pivot code knows which attribute or attributes of an entity will provider the input value.

>>> ip_entity = IpAddress(Address="40.85.232.64")
>>> IpAddress.util.ip_type(ip_entity)
 

ip

result

0

40.85.232.64

Public

 

Iterable/DataFrame inputs and single-value functions

Many of the underlying functions only accept single values as inputs. Examples of these are the data query functions - typically they expect a single host name, IP address, etc.

Pivot knows about the type of parameters that the function accepts. It will adjust the input to match the expectations of the underlying function. If a list or DataFrame is passed as input to a single-value function Pivot will split the input and call the function once for each value. It then combines the output into a single DataFrame before returning the results.

You can read a bit more about how this is done in the Appendix - "how do pivot wrappers work?"

 

Data queries - where does the time range come from?

The Pivot class has a built-in time range, which is used by default for all queries. Don't worry - you can change it easily.

To see the current time setting:

>>> Pivot.current.timespan
TimeStamp(start=2021-02-15 21:01:40.381864, end=2021-02-16 21:01:40.381864, period=-1 day, 0:00:00)

Note: "Pivot.current" gives you access to the last created instance of the Pivot class - if you've created multiple instances of Pivot (which you rarely need to do), you can always get to the last one you created using this class attribute.

 

You can edit the time range interactively

Pivot.current.edit_query_time()

Or by setting the timespan property directly.

>>> from msticpy.common.timespan import TimeSpan
>>> # TimeSpan accepts datetimes or datestrings
>>> timespan = TimeSpan(start="02/01/2021", end="02/15/2021")
>>> Pivot.current.timespan = timespan
TimeStamp(start=2021-02-01 00:00:00, end=2021-02-15 00:00:00, period=-14 days +00:00:00)

In an upcoming release there is also a convenience function for setting the time directly with Python datetimes or date strings.

Pivot.current.set_timespan(start="2020-02-06 03:00:00", end="2021-02-15 01:42:42")

You can also override the built-in time settings by specifying start and end as parameters to the query function.

Host.AzureSentinel.SecurityAlert_list_related_alerts(host_name="victim00", start=dt1, end=dt2)

 

Supplying extra parameters

The Pivot layer will pass any unused keyword parameters to the underlying function. This does not usually apply to positional parameters - if you want parameters to get to the function, you have to name them explicitly. In this example the add_query_items parameter is passed to the underlying query function

>>> entities.Host.AzureSentinel.SecurityEvent_list_host_logons(
    host_name="victimPc",
    add_query_items="| summarize count() by LogonType"
)
 

LogonType

count_

0

5

27492

1

4

12597

2

3

6936

3

2

173

4

10

58

5

9

8

6

0

19

7

11

1

 

 

Pivot Pipelines

 

Because all pivot functions accept DataFrames as input and produce DataFrames as output, it means that it is possible to chain pivot functions into a pipeline.

 

Joining input to output

You can join the input to the output. This usually only makes sense when the input is a DataFrame. It lets you keep the previously accumulated results and tag on the additional columns produced by the pivot function you are calling.

 

The join parameter supports "inner", "left", "right" and "outer" joins (be careful with the latter though!) See pivot joins documentation for more details.

 

Although joining is useful in pipelines you can use it on any function whether in a pipeline or not. In this example you can see that the idx, ip and type columns have been carried over from the source DataFrame and joined with the output.

>>> entities.IpAddress.util.whois(ip_df, column="ip", join="inner")

idx

ip

type

nir

asn_registry

asn

asn_cidr

asn_country_code

asn_date

asn_description

query

nets

0

172.217.15.99

Public

NaN

arin

15169

172.217.15.0/24

US

2012-04-16

GOOGLE, US

172.217.15.99

[{'cidr': '172.217.0.0/16', 'name': 'GOOGLE', 'handle': 'NET-172-217-0-0-1', 'range': '172.217.0...

1

40.85.232.64

Public

NaN

arin

8075

40.80.0.0/12

US

2015-02-23

MICROSOFT-CORP-MSN-AS-BLOCK, US

40.85.232.64

[{'cidr': '40.80.0.0/12, 40.124.0.0/16, 40.125.0.0/17, 40.74.0.0/15, 40.120.0.0/14, 40.76.0.0/14...

2

20.38.98.100

Public

NaN

arin

8075

20.36.0.0/14

US

2017-10-18

MICROSOFT-CORP-MSN-AS-BLOCK, US

20.38.98.100

[{'cidr': '20.64.0.0/10, 20.40.0.0/13, 20.34.0.0/15, 20.128.0.0/16, 20.36.0.0/14, 20.48.0.0/12, ...

 

Pipelines

Pivot pipelines are implemented pandas customr accessors. Read more about Extending pandas here.

 

When you load Pivot it adds the mp_pivot pandas DataFrame accessor. This appears as an attribute to DataFrames.

>>> ips_df.mp_pivot
<msticpy.datamodel.pivot_pd_accessor.PivotAccessor at 0x275754e2208>

The main pipelining function run is a method of mp_pivot. run requires two parameters

  • the pivot function to run and
  • the column to use as input.

See mp_pivot.run documentation for more details.

 

Here is an example of using it to call four pivot functions, each using the output of the previous function as input and using the join parameter to accumulate the results from each stage.

 

1. (
2.     ips_df
3.     .mp_pivot.run(IpAddress.util.ip_type, column="IP", join="inner")
4.     .query("result == 'Public'").head(10)
5.     .mp_pivot.run(IpAddress.util.whois, column="ip", join="left")
6.     .mp_pivot.run(IpAddress.util.geoloc_mm, column="ip", join="left")
7.     .mp_pivot.run(IpAddress.AzureSentinel.SecurityAlert_list_alerts_for_ip, source_ip_list="ip", join="left")
8. ).head(5)

 

Let's step through it line by line.

  1. The whole thing is surrounded by a pair of parentheses - this is just to let us split the whole expression over multiple lines without Python complaining.
  2. Next we have ips_df - this is just the starting DataFrame, our input data.
  3. Next we call the mp_pivot.run() accessor method on this dataframe. We pass it the pivot function that we want to run (IpAddress.util.ip_type) and the input column name (IP). This column name is the column in ips_df where our input IP addresses are. We've also specified an join type of "inner". In this case the join type doesn't really matter since we know we get exactly one output row for every input row.
  4. We're using the pandas query function to filter out unwanted entries from the previous stage. In this case we only want "Public" IP addresses. This illustrates that you can intersperse standard pandas functions in the same pipeline. We could have also added a column selector expression ([["col1", "col2"...]]), for example, if we wanted to filter the columns passed to the next stage
  5. We are calling a further pivot function - whois. Remember the "column" parameter always refers to the input column, i.e. the column from previous stage that we want to use in this stage.
  6. We are calling geoloc_mm to get geo location details joining with a "left" join - this preserves the input data rows and adds null columns in any cases where the pivot function returned no result.
  7. Is the same as 6 except the called function is a data query to see if we have any alerts that contain these IP addresses. Remember, in the case of data queries we have to name the specific query parameter that we want the input to go to. In this case, each row value in the ip column from the previous stage will be sent to the query.
  8. Finally we close the parentheses to form a valid Python expression. The whole expression returns a DataFrame so we can add further pandas operations here (like .head(5) shown here).

 

>>> (
    ips_df
    .mp_pivot.run(entities.IpAddress.util.ip_type, column="IP", join="inner")
    .query("result == 'Public'").head(10)
     .mp_pivot.run(entities.IpAddress.util.whois, column="ip", join="left")
     .mp_pivot.run(entities.IpAddress.util.geoloc_mm, column="ip", join="left")
    .mp_pivot.run(entities.IpAddress.AzureSentinel.SecurityAlert_list_alerts_for_ip, source_ip_list="ip", join="left")
).head(5)
 

TenantId

TimeGenerated

AlertDisplayName

AlertName

Severity

Description

ProviderName

VendorName

VendorOriginalId

SystemAlertId

AlertType

ConfidenceLevel

0

8ecf8077-cf51-4820-aadd-14040956f35d

2020-12-23 14:08:12+00:00

Microsoft Threat Intelligence Analytics

Microsoft Threat Intelligence Analytics

Medium

Microsoft threat intelligence analytic has detected Blocked communication to a known WatchList d...

Threat Intelligence Alerts

Microsoft

91d806d3-6b6f-4e5c-a78f-e674d602be51

625ff9af-dddc-0cf8-9d4b-e79067fa2e71

ThreatIntelligence

83

1

8ecf8077-cf51-4820-aadd-14040956f35d

2020-12-23 14:08:12+00:00

Microsoft Threat Intelligence Analytics

Microsoft Threat Intelligence Analytics

Medium

Microsoft threat intelligence analytic has detected Blocked communication to a known WatchList d...

Threat Intelligence Alerts

Microsoft

173063c4-10dd-4dd2-9e4f-ec5ed596ec54

c977f904-ab30-d57e-986f-9d6ebf72771b

ThreatIntelligence

83

2

8ecf8077-cf51-4820-aadd-14040956f35d

2020-12-23 14:08:12+00:00

Microsoft Threat Intelligence Analytics

Microsoft Threat Intelligence Analytics

Medium

Microsoft threat intelligence analytic has detected Blocked communication to a known WatchList d...

Threat Intelligence Alerts

Microsoft

58b2cda2-11c6-42b8-b6f1-72751cad8f38

9ee547e4-cba1-47d1-e1f9-87247b693a52

ThreatIntelligence

83

 

Other pipeline functions

In addition to run, the mp_pivot accessor also has the following functions:

  • display - this simply displays the data at the point called in the pipeline. You can add an optional title, filtering and the number or rows to display
  • tee - this forks a copy of the DataFrame at the point it is called in the pipeline. It will assign the forked copy to the name given in the var_name parameter. If there is an existing variable of the same name it will not overwrite it unless you add the clobber=True parameter.

In both cases the pipelined data is passed through unchanged.

See Pivot functions help for more details.

 

Use of these is shown below in this partial pipeline.

    ...
    .mp_pivot.run(IpAddress.util.geoloc_mm, column="ip", join="left")
    .mp_pivot.display(title="Geo Lookup", cols=["IP", "City"])  # << display an intermediate result
    .mp_pivot.tee(var_name="geoip_df", clobber=True)  # << save a copy called 'geoip_df'
    .mp_pivot.run(IpAddress.AzureSentinel.SecurityAlert_list_alerts_for_ip, source_ip_list="ip", join="left")

 

In the next release we've also implemented:

  • tee_exec - this executes a function on a forked copy of the DataFrame The function must be a pandas function or custom accessor. A good example of the use of this might be creating a plot or summary table to display partway through the pipeline.

 

Extending Pivot - adding your own (or someone else's) functions

 

You can add pivot functions of your own. You need to supply:

  • the function
  • some metadata that describes where the function can be found and how the function works

Full details of this are described here.

 

The current version of Pivot doesn't let you add functions defined inline (i.e. written in the notebook itself) but this will be possible in the forthcoming release.

 

Let's create a function in a Python module my_module.py. We can do this using the %%write_file magic function and running the cell.

%%writefile my_module.py
"""Upper-case and hash"""
from hashlib import md5

def my_func(input: str):
    md5_hash = "-".join(hex(b)[2:] for b in md5(input.encode("utf-8")).digest())
    return {
        "Title": input.upper(),
        "Hash": md5_hash
    }

We also need to create a YAML definition file for our pivot function. Again we can use %%write_file to create a local file in the current directory. We need to tell Pivot

  • the name of the function and source module,
  • the name of the container that the function will appear in,
  • the input type expected by the function ("value", "list" or "dataframe")
  • which entities to add the pivot to, along with a corresponding attribute of the entity. (The attribute is used in cases where you are passing an instance of an entity itself as an input parameter - if in doubt just use any valid attribute of the entity).
  • The name of the input attribute of the underlying function.
  • An (optional) new name to give the function.
%%writefile my_func.yml
pivot_providers:
  my_func_defn:
    src_func_name: my_func
    src_module: my_module
    entity_container_name: cyber
    input_type: value
    entity_map:
      Host: HostName
    func_input_value_arg: input
    func_new_name: upper_hash_name

Now we can register the function we created as a pivot function.

>>> from msticpy.datamodel.pivot_register_reader import register_pivots
>>> register_pivots("my_func.yml")

An then run it.

>>> Host.cyber.upper_hash_name("host_name")
 

Title

Hash

input

0

HOST_NAME

5d-41-40-2a-bc-4b-2a-76-b9-71-9d-91-10-17-c5-92

host_name

 

In the next release, this will be available as a simple function that can be used to add a function defined in the notebook as shown here.

 

from hashlib import md5

def my_func2(input: str):
    md5_hash = "-".join(hex(b)[2:] for b in md5(input.encode("utf-8")).digest())
    return {
        "Title": input.upper(),
        "Hash": md5_hash
    }


Pivot.add_pivot_function(
    func=my_func2,
    container="cyber",  # which container it will appear in on the entity
    input_type="value",
    entity_map={"Host": "HostName"},
    func_input_value_arg="input",
    func_new_name="il_upper_hash_name",
)

Host.cyber.il_upper_hash_name("host_name")
 

Title

Hash

input

0

HOST_NAME

5d-41-40-2a-bc-4b-2a-76-b9-71-9d-91-10-17-c5-92

host_name

 

 

Conclusion

 

We've taken a short tour through the MSTICPy Pivot functions, looking at how they make the functionality in MSTICPy easier to discover and use.

 

I'm particularly excited about the pipeline functionality. In the next release we're going to make it possible to define reusable pipelines in configuration files and execute them with a single function call. This should help streamline some common patterns in notebooks for Cyber hunting and investigation.

 

Please send any feedback or suggestions for improvements to msticpy@microsoft.com or create an issue on https://github.com/microsoft/msticpy.

 

Happy hunting!

 

Appendix - how do pivot wrappers work?

 

In Python you can create functions that return other functions. This is called wrapping the function.

It allows the outer function to do additional things to the input parameters and the return value of the inner function.

 

Take this simple function that just applies proper capitalization to an input string.

def print_me(arg):
    print(arg.capitalize())

print_me("hello")

Hello

 

If we try to pass a list to this function we get an expected exception since the function only knows how to process a string

print_me(["hello", "world"])
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-36-94b3e61eb86f> in <module>

AttributeError: 'list' object has no attribute 'capitalize'

We could create a wrapper function that checked the input and iterated over the individual items if arg is a list. The works but we don't want to have to do this for every function that we want to have flexible input!

def print_me_list(arg):
    if isinstance(arg, list):
        for item in arg:
            print_me(item)
    else:
        print_me(arg)

print_me_list("hello")
print_me_list(["how", "are", "you", "?"])

Hello

How

Are

You

?

 

Instead, we can create a function wrapper.

In the example below, the outer function dont_care_func defines an inner function - list_or_str - and then returns this function. The inner function list_or_str is what implements the same "is-this-a-string-or-list" logic that we saw in the previous example. Crucially though, it isn't hard-coded to call print_me but calls whatever function is passed (the func parameter) to it from the outer function dont_care_func.

 

# Our magic wrapper
def dont_care_func(func):

    def list_or_str(arg):
        if isinstance(arg, list):
            for item in arg:
                func(item)
        else:
            func(arg)
    return list_or_str

 

How do we use this?

We simply pass the function that we want to wrap to dont_care_func. Recall, that this function just returns an instance of the inner function. In this case the value func will have been replaced by the actual function print_me.

 print_stuff = dont_care_func(print_me)

Now we have a wrapped version of print_me that can handle different types of input. Magic!

 

print_stuff("hello")
print_stuff(["how", "are", "you", "?"])

Hello

How

Are

You

?

We can also define further functions and create wrapped versions of those by passing them to dont_care_func.

def shout_me(arg):
    print(arg.upper(), "\U0001F92C!", end=" ") 

shout_stuff = dont_care_func(shout_me)

shout_stuff("hello")
shout_stuff(["how", "are", "you", "?"])

HELLO 🤬! HOW 🤬! ARE 🤬! YOU 🤬! ? 🤬!

 

The wrapper functionality in Pivot is a bit more complex than this but essentially operates this way.

%3CLINGO-SUB%20id%3D%22lingo-sub-2151112%22%20slang%3D%22en-US%22%3EJupyter%20Notebook%20Pivot%20Functions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2151112%22%20slang%3D%22en-US%22%3E%3CP%3EWe%20recently%20released%20a%20new%20version%20of%20%3CEM%3EMSTICPy%3C%2FEM%3E%20with%20a%20feature%20called%20%3CSTRONG%3EPivot%20functions%3C%2FSTRONG%3E.%3C%2FP%3E%0A%3CP%3EThis%20feature%20has%20three%20main%20goals%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EMaking%20it%20easy%20to%20discover%20and%20invoke%20%3CEM%3EMSTICPy%3C%2FEM%3E%20functionality.%3C%2FLI%3E%0A%3CLI%3ECreating%20a%20standardized%20way%20to%20call%20pivotable%20functions.%3C%2FLI%3E%0A%3CLI%3ELetting%20you%20assemble%20multiple%20functions%20into%20re-usable%20pipelines.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EThe%20pivot%20functionality%20exposes%20operations%20relevant%20to%20a%20particular%20entity%20as%20methods%20(or%20functions)%20of%20that%20entity.%20These%20operations%20include%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EData%20queries%3C%2FLI%3E%0A%3CLI%3EThreat%20intelligence%20lookups%3C%2FLI%3E%0A%3CLI%3EOther%20data%20lookups%20such%20as%20geo-location%20or%20domain%20resolution%3C%2FLI%3E%0A%3CLI%3Eand%20other%20local%20functionality%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EHere%20are%20a%20couple%20of%20examples%20showing%20calling%20different%20kinds%20of%20enrichment%20functions%20from%20the%20%3CEM%3EIpAddress%20%3C%2FEM%3Eentity%3A%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%3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2FSPAN%3E%3CSPAN%3E.%3C%2FSPAN%3E%3CSPAN%3Ewhois%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3E%22157.53.1.1%22%3C%2FSPAN%3E%3CSPAN%3E))%3CBR%20%2F%3E%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%3Easn%3C%2FSPAN%3E%26nbsp%3B%20%3CSPAN%3Easn_cidr%3C%2FSPAN%3E%26nbsp%3B%20%3CSPAN%3Easn_country_code%3C%2FSPAN%3E%26nbsp%3B%20%3CSPAN%3Easn_date%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%3Easn_description%3C%2FSPAN%3E%26nbsp%3B%20%3CSPAN%3Easn_registry%3C%2FSPAN%3E%26nbsp%3B%20%3CSPAN%3Enets%3C%2FSPAN%3E%20%3CSPAN%3E.....%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CBR%20%2F%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%20%20%20%20NA%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%20%3CSPAN%3ENA%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%3EUS%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%3E2015%3C%2FSPAN%3E%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3E04%3C%2FSPAN%3E%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3E01%3C%2FSPAN%3E%26nbsp%3B%20%3CSPAN%3ENA%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%3Earin%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%3E%5B%7B%3C%2FSPAN%3E%3CSPAN%3E'cidr'%3C%2FSPAN%3E%3CSPAN%3E%3A%3C%2FSPAN%3E%20%3CSPAN%3E'157.53.0.0%2F16'%3C%2FSPAN%3E%3CSPAN%3E...%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%3C%2FSPAN%3E%20%3CSPAN%3EIpAddress%3C%2FSPAN%3E%3CSPAN%3E.%3C%2FSPAN%3E%3CSPAN%3Eutil%3C%2FSPAN%3E%3CSPAN%3E.%3C%2FSPAN%3E%3CSPAN%3Egeoloc_mm%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3Evalue%3C%2FSPAN%3E%3CSPAN%3E%3D%3C%2FSPAN%3E%3CSPAN%3E%22157.53.1.1%22%3C%2FSPAN%3E%3CSPAN%3E))%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%3ECountryCode%3C%2FSPAN%3E%26nbsp%3B%20%3CSPAN%3ECountryName%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%3EState%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%20%3CSPAN%3ECity%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%20%3CSPAN%3ELongitude%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%20%3CSPAN%3ELatitude%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%20%3CSPAN%3EAsn%3C%2FSPAN%3E%3CSPAN%3E...%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%3EUS%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%3EUnited%3C%2FSPAN%3E%20%3CSPAN%3EStates%3C%2FSPAN%3E%26nbsp%3B%20%3CSPAN%3ENone%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%3ENone%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%20%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3E97.822%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%3E37.751%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%3ENone%3C%2FSPAN%3E%3CSPAN%3E...%3C%2FSPAN%3E%3C%2FPRE%3E%0A%3CP%3EThis%20second%20example%20shows%20a%20pivot%20function%20that%20does%20a%20data%20query%20for%20host%20logon%20events%20from%20a%20Host%20entity.%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%3C%2FSPAN%3E%20%3CSPAN%3EHost%3C%2FSPAN%3E%3CSPAN%3E.%3C%2FSPAN%3E%3CSPAN%3EAzureSentinel%3C%2FSPAN%3E%3CSPAN%3E.%3C%2FSPAN%3E%3CSPAN%3Elist_host_logons%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3Ehost_name%3C%2FSPAN%3E%3CSPAN%3E%3D%3C%2FSPAN%3E%3CSPAN%3E%22VictimPc%22%3C%2FSPAN%3E%3CSPAN%3E)%3CBR%20%2F%3E%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%3EAccount%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%3EEventID%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%20%3CSPAN%3ETimeGenerated%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%3EComputer%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%3ESubjectUserName%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%20%3CSPAN%3ESubjectDomainName%3CBR%20%2F%3E%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%3ENT%3C%2FSPAN%3E%20%3CSPAN%3EAUTHORITY%3C%2FSPAN%3E%5C%3CSPAN%3ESYSTEM%3C%2FSPAN%3E%26nbsp%3B%20%3CSPAN%3E4624%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3CSPAN%3E2020%3C%2FSPAN%3E%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3E10%3C%2FSPAN%3E%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3E01%3C%2FSPAN%3E%20%3CSPAN%3E22%3C%2FSPAN%3E%3CSPAN%3E%3A%3C%2FSPAN%3E%3CSPAN%3E39%3C%2FSPAN%3E%3CSPAN%3E%3A%3C%2FSPAN%3E%3CSPAN%3E36.987000%3C%2FSPAN%3E%3CSPAN%3E%2B%3C%2FSPAN%3E%3CSPAN%3E00%3C%2FSPAN%3E%3CSPAN%3E%3A%3C%2FSPAN%3E%3CSPAN%3E00%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%20%20%20%3CSPAN%3EVictimPc%3C%2FSPAN%3E%3CSPAN%3E.%3C%2FSPAN%3E%3CSPAN%3EContoso%3C%2FSPAN%3E%3CSPAN%3E.%3C%2FSPAN%3E%3CSPAN%3EAzure%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%20%20%20%20%3CSPAN%3EVictimPc%3C%2FSPAN%3E%3CSPAN%3E%24%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%20%3CSPAN%3ECONTOSO%3C%2FSPAN%3E%3C%2FPRE%3E%0A%3CP%3EYou%20can%20also%20add%20other%20functions%20from%203rd%20party%20Python%20packages%20or%20ones%20you%20write%20yourself%20as%20pivot%20functions.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1974595507%22%20id%3D%22toc-hId-1973701624%22%3ETerminology%3C%2FH3%3E%0A%3CP%3EBefore%20we%20get%20into%20things%20let's%20clear%20up%20a%20few%20terms.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EEntities%3C%2FSTRONG%3E%20-%26nbsp%3BThese%20are%20Python%20classes%20that%20represent%20real-world%20objects%20commonly%20encountered%20in%20CyberSec%20investigations%20and%20hunting.%20E.g.%2C%20Host%2C%20URL%2C%20IP%20Address%2C%20Account%2C%20etc.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EPivoting%3C%2FSTRONG%3E%20-%26nbsp%3BThis%20comes%20from%20the%20common%20practice%20in%20CyberSec%20investigations%20of%20navigating%20from%20one%20suspect%20entity%20to%20another.%20E.g.%2C%20you%20might%20start%20with%20an%20alert%20identifying%20a%20potentially%20malicious%20IP%20Address%2C%20from%20there%20you%20'pivot'%20to%20see%20which%20hosts%20or%20accounts%20were%20communicating%20with%20that%20address.%20From%20there%20you%20might%20pivot%20again%20to%20look%20at%20processes%20running%20on%20the%20host%20or%20Office%20activity%20for%20the%20account.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId--1629810315%22%20id%3D%22toc-hId--1630704198%22%3EBackground%20reading%3C%2FH4%3E%0A%3CP%3EThis%20article%20is%20available%20in%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsticpy%2Fblob%2Fmaster%2Fdocs%2Fnotebooks%2FPivotFunctions-Introduction.ipynb%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3ENotebook%20form%3C%2FA%3E%20so%20that%20you%20can%20try%20out%20the%20examples.%20%5BTODO%5D%3C%2FP%3E%0A%3CP%3EThere%20is%20also%20full%20documentation%20of%20the%20Pivot%20functionality%20on%20our%20%3CA%20href%3D%22https%3A%2F%2Fmsticpy.readthedocs.io%2Fen%2Flatest%2Fdata_analysis%2FPivotFunctions.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EReadtheDocs%20page.%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-156637940%22%20id%3D%22toc-hId-155744057%22%3ELife%20before%20pivot%20functions%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBefore%20Pivot%20functions%20your%20ability%20to%20use%20the%20various%20bits%20of%20functionality%20in%20%3CEM%3EMSTICPy%3C%2FEM%3E%20was%20always%20bounded%20by%20your%20knowledge%20of%20where%20a%20certain%20function%20was%20(or%20your%20enthusiasm%20for%20reading%20the%20docs).%3C%2FP%3E%0A%3CP%3EFor%20example%2C%20suppose%20you%20had%20an%20IP%20address%20that%20you%20wanted%20to%20do%20some%20simple%20enrichment%20on.%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3Eip_addr%3C%2FSPAN%3E%20%3CSPAN%3E%3D%3C%2FSPAN%3E%20%3CSPAN%3E%2220.72.193.242%22%3C%2FSPAN%3E%3C%2FPRE%3E%0A%3CP%3EFirst%2C%20you'd%20need%20to%20locate%20and%20import%20the%20functions.%20There%20might%20also%20be%20(as%20in%20the%20%3CEM%3EGeoIPLiteLookup%3C%2FEM%3E%20class)%20some%20initialization%20step%20you'd%20need%20to%20do%20before%20using%20the%20functionality.%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3Efrom%3C%2FSPAN%3E%20%3CSPAN%3Emsticpy.sectools.ip_utils%3C%2FSPAN%3E%20%3CSPAN%3Eimport%3C%2FSPAN%3E%20%3CSPAN%3Eget_ip_type%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%3Efrom%3C%2FSPAN%3E%20%3CSPAN%3Emsticpy.sectools.ip_utils%3C%2FSPAN%3E%20%3CSPAN%3Eimport%3C%2FSPAN%3E%20%3CSPAN%3Eget_whois_info%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%3Efrom%3C%2FSPAN%3E%20%3CSPAN%3Emsticpy.sectools.geoip%3C%2FSPAN%3E%20%3CSPAN%3Eimport%3C%2FSPAN%3E%20%3CSPAN%3EGeoLiteLookup%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%3Egeoip%3C%2FSPAN%3E%20%3CSPAN%3E%3D%3C%2FSPAN%3E%20%3CSPAN%3EGeoLiteLookup%3C%2FSPAN%3E%3CSPAN%3E()%3C%2FSPAN%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENext%20you%20might%20have%20to%20check%20the%20help%20for%20each%20function%20to%20work%20it%20parameters.%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20help%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3Eget_ip_type%3C%2FSPAN%3E%3CSPAN%3E)%3CBR%20%2F%3E%3C%2FSPAN%3EHelp%20on%20function%20get_ip_type%20in%20module%20msticpy.sectools.ip_utils%3A%26nbsp%3B%3CBR%20%2F%3Eget_ip_type(ip%3A%20str%20%3D%20None%2C%20ip_str%3A%20str%20%3D%20None)%20-%26gt%3B%20str%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CBR%20%2F%3E%20%20%20%20Validate%20value%20is%20an%20IP%20address%20and%20deteremine%20IPType%20category.%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B...%26nbsp%3B%3C%2FPRE%3E%0A%3CP%3EThen%20finally%20run%20the%20functions.%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20get_ip_type%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3Eip_addr%3C%2FSPAN%3E%3CSPAN%3E)%3CBR%20%2F%3E%3C%2FSPAN%3E'Public'%3C%2FPRE%3E%0A%3CPRE%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20get_whois_info%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3Eip_addr%3C%2FSPAN%3E%3CSPAN%3E)%3CBR%20%2F%3E%3C%2FSPAN%3E('MICROSOFT-CORP-MSN-AS-BLOCK%2C%20US'%2C%20%3CBR%20%2F%3E%20%20%20%20%7B'nir'%3A%20None%2C%26nbsp%3B%20'asn_registry'%3A%20'arin'%2C%26nbsp%3B%20'asn'%3A%20'8075'%2C%26nbsp%3B%20'asn_cidr'%3A%20'20.64.0.0%2F10'%2C%26nbsp%3B%20'asn_country_code'%3A%20'US'%2C%26nbsp%3B%20'asn_date'%3A%20'2017-10-18'%2C%26nbsp%3B%20'asn_description'%3A%20'MICROSOFT-CORP-MSN-AS-BLOCK%2C%20US'%2C%26nbsp%3B%20'query'%3A%20'20.72.193.242'%2C%26nbsp%3B%20'nets'%3A%20...%3C%2FPRE%3E%0A%3CPRE%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20geoip%3C%2FSPAN%3E%3CSPAN%3E.%3C%2FSPAN%3E%3CSPAN%3Elookup_ip%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3Eip_addr%3C%2FSPAN%3E%3CSPAN%3E)%3CBR%20%2F%3E%3C%2FSPAN%3E(%5B%7B'continent'%3A%20%3CBR%20%2F%3E%20%20%20%20%7B'code'%3A%20'NA'%2C%26nbsp%3B%26nbsp%3B%26nbsp%3B%20'geoname_id'%3A%206255149%2C%26nbsp%3B%26nbsp%3B%26nbsp%3B%20'names'%3A%20%3CBR%20%2F%3E%20%20%20%20%20%20%20%7B'de'%3A%20'Nordamerika'%2C%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20'en'%3A%20'North%20America'%2C%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20'es'%3A%20'Norteam%C3%A9rica'%2C%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20'fr'%3A%20'Am%C3%A9rique%20du%20Nord'%2C%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20'ja'%3A%20'%E5%8C%97%E3%82%A2%E3%83%A1%E3%83%AA%E3%82%AB'%2C%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20'pt-BR'%3A%20'Am%C3%A9rica%20do%20Norte'%2C%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20'ru'%3A%20'%D0%A1%D0%B5%D0%B2%D0%B5%D1%80%D0%BD%D0%B0%D1%8F%20%D0%90%D0%BC%D0%B5%D1%80%D0%B8%D0%BA%D0%B0'%2C%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20'zh-CN'%3A%20'%E5%8C%97%E7%BE%8E%E6%B4%B2'%7D%7D%2C%26nbsp%3B%26nbsp%3B%20'country'%3A%20%7B'geoname_id'%3A%206252001%2C%26nbsp%3B%26nbsp%3B%26nbsp%3B%20'iso_code'%3A%20'US'%2C%26nbsp%3B%26nbsp%3B%26nbsp%3B%20'names'%3A%20%7B'de'%3A%20'USA'%2C%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20'en'%3A%20'United%20States'%2C%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20'es'%3A%20'Estados%20Unidos'%2C%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20...%3C%2FPRE%3E%0A%3CP%3EAt%20which%20point%20you'd%20discover%20that%20the%20output%20from%20each%20function%20was%20somewhat%20raw%20and%20it%20would%20take%20a%20bit%20more%20work%20if%20you%20wanted%20to%20combine%20it%20in%20any%20way%20(say%20in%20a%20single%20table).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20the%20rest%20of%20the%20article%20we'll%20show%20you%20how%20Pivot%20functions%20make%20it%20easier%20to%20discover%20data%20and%20enrichment%20functions.%20We'll%20also%20show%20how%20pivot%20functions%20bring%20standardization%20and%20handle%20different%20types%20of%20input%20(including%20lists%20and%20DataFrames)%20and%20finally%2C%20how%20the%20standardized%20output%20lets%20you%20chain%20multiple%20pivot%20functions%20together%20into%20re-usable%20pipelines%20of%20functionality.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1650816523%22%20id%3D%22toc-hId--1651710406%22%3EGetting%20started%20with%20pivot%20functions%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELet's%20get%20started%20with%20how%20to%20use%20Pivot%20functions.%3C%2FP%3E%0A%3CP%3ETypically%2C%20we%20use%20%3CEM%3EMSTICPy%3C%2FEM%3E's%20%3CEM%3Einit_notebook%3C%2FEM%3E%20function%20at%20the%20start%20of%20any%20notebook.%20This%20handles%20checking%20versions%20and%20importing%20some%20commonly-used%20packages%20and%20modules%20(both%20%3CEM%3EMSTICPy%3C%2FEM%3E%20and%203rd%20party%20packages%20like%20%3CEM%3Epandas).%3C%2FEM%3E%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20from%3C%2FSPAN%3E%20%3CSPAN%3Emsticpy.nbtools.nbinit%3C%2FSPAN%3E%20%3CSPAN%3Eimport%3C%2FSPAN%3E%20%3CSPAN%3Einit_notebook%3CBR%20%2F%3E%26gt%3B%26gt%3B%26gt%3B%20%3C%2FSPAN%3E%3CSPAN%3Einit_notebook%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3Enamespace%3C%2FSPAN%3E%3CSPAN%3E%3D%3C%2FSPAN%3E%3CSPAN%3Eglobals%3C%2FSPAN%3E%3CSPAN%3E())%3B%3CBR%20%2F%3E%3C%2FSPAN%3EProcessing%20imports........%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThen%20there%20are%20a%20couple%20of%20preliminary%20steps%20needed%20before%20you%20can%20use%20pivot%20functions.%20The%20main%20one%20is%20loading%20the%20Pivot%20class.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPivot%20functions%20are%20added%20to%20the%20entities%20dynamically%20by%20the%20Pivot%20class.%20The%20Pivot%20class%20will%20try%20to%20discover%20relevant%20functions%20from%20queries%2C%20Threat%20Intel%20providers%20and%20various%20utility%20functions.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20some%20cases%2C%20notably%20data%20queries%2C%20the%20data%20query%20functions%20are%20themselves%20created%20dynamically%2C%20so%20these%20need%20to%20be%20loaded%20before%20you%20create%20the%20Pivot%20class.%20(You%20can%20always%20create%20a%20new%20instance%20of%20this%20class%2C%20which%20forces%20re-discovery%2C%20so%20don't%20worry%20if%20mess%20up%20the%20order%20of%20things).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ENote%3C%2FSTRONG%3E%20in%20most%20cases%20we%20don't%20need%20to%20connect%2Fauthenticate%20to%20a%20data%20provider%20prior%20to%20loading%20%3CEM%3EPivot.%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELet's%20load%20our%20data%20query%20provider%20for%20AzureSentinel.%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20az_provider%3C%2FSPAN%3E%20%3CSPAN%3E%3D%3C%2FSPAN%3E%20%3CSPAN%3EQueryProvider%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3E%22AzureSentinel%22%3C%2FSPAN%3E%3CSPAN%3E)%3CBR%20%2F%3E%3C%2FSPAN%3EPlease%20wait.%20Loading%20Kqlmagic%20extension...%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENow%20we%20can%20load%20and%20instantiate%20the%20Pivot%20class.%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20from%3C%2FSPAN%3E%20%3CSPAN%3Emsticpy.datamodel.pivot%3C%2FSPAN%3E%20%3CSPAN%3Eimport%3C%2FSPAN%3E%20%3CSPAN%3EPivot%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20pivot%3C%2FSPAN%3E%20%3CSPAN%3E%3D%3C%2FSPAN%3E%20%3CSPAN%3EPivot%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3Enamespace%3C%2FSPAN%3E%3CSPAN%3E%3D%3C%2FSPAN%3E%3CSPAN%3Eglobals%3C%2FSPAN%3E%3CSPAN%3E())%3C%2FSPAN%3E%3C%2FPRE%3E%0A%3CP%3EWhy%20do%20we%20need%20to%20pass%20%22namespace%3Dglobals()%22%3F%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPivot%20searches%20through%20the%20current%20objects%20defined%20in%20the%20Python%2Fnotebook%20namespace%20to%20find%20provider%20objects%20that%20it%20will%20use%20to%20create%20the%20pivot%20functions.%20This%20is%20most%20relevant%20for%20%3CEM%3EQueryProviders%20-%20%3C%2FEM%3Ewhen%20you%20create%20a%20Pivot%20class%20instance%20it%20will%20find%20and%20use%20the%20relevant%20queries%20from%20the%20az_provider%20object%20that%20we%20created%20in%20the%20previous%20step.%20In%20most%20other%20cases%20(like%20GeoIP%20and%20ThreatIntel%20providers%2C%20it%20will%20create%20new%20ones%20if%20it%20can't%20find%20existing%20ones).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-836696310%22%20id%3D%22toc-hId-835802427%22%3EEasy%20discovery%20of%20functionality%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1527257784%22%20id%3D%22toc-hId-1526363901%22%3EFind%20the%20entity%20name%20you%20need%3C%2FH3%3E%0A%3CP%3EThe%20simplest%20way%20to%20do%20this%20is%20simply%20enumerate%20(using%20Python%26nbsp%3B%3CEM%3Edir()%3C%2FEM%3E%20function)%20the%20contents%20of%20the%20%3CEM%3EMSTICPy%3C%2FEM%3E%20entities%20sub-package.%20This%20should%20have%20already%20been%20imported%20by%20the%20%3CEM%3Einit_notebook%3C%2FEM%3E%20function%20that%20we%20ran%20earlier.%3C%2FP%3E%0A%3CP%3EThe%20items%20at%20the%20beginning%20of%20the%20list%20with%20proper%20capitalization%20are%20the%20entities.%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20dir%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3Eentities%3C%2FSPAN%3E%3CSPAN%3E)%3CBR%20%2F%3E%3C%2FSPAN%3E%5B'Account'%2C%20'Alert'%2C%20'Algorithm'%2C%20'AzureResource'%2C%20'CloudApplication'%2C%20'Dns'%2C%20'ElevationToken'%2C%20'Entity'%2C%20'File'%2C%20'FileHash'%2C%20'GeoLocation'%2C%20'Host'%2C%20'HostLogonSession'%2C%20'IpAddress'%2C%20'Malware'%2C%20...%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe're%20going%20to%20make%20this%20a%20little%20more%20elegant%20in%20a%20forthcoming%20update%20with%20this%20helper%20function.%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20entities%3C%2FSPAN%3E%3CSPAN%3E.%3C%2FSPAN%3E%3CSPAN%3Efind_entity%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3E%22ip%22%3C%2FSPAN%3E%3CSPAN%3E)%3CBR%20%2F%3E%3C%2FSPAN%3EMatch%20found%20'IpAddress'msticpy.datamodel.entities.ip_address.IpAddress%3C%2FPRE%3E%0A%3CH3%20id%3D%22toc-hId--280196679%22%20id%3D%22toc-hId--281090562%22%3EListing%20pivot%20functions%20available%20for%20an%20entity%3C%2FH3%3E%0A%3CP%3ENote%20you%20can%20always%20address%20an%20entity%20using%20its%20qualified%20path%2C%20e.g.%20%22entities.IpAddress%22%20but%20if%20you%20are%20going%20to%20use%20one%20or%20two%20entities%20a%20lot%2C%20it%20will%20save%20a%20bit%20of%20typing%20if%20you%20import%20them%20explicitly.%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20from%3C%2FSPAN%3E%20%3CSPAN%3Emsticpy.datamodel.entities%3C%2FSPAN%3E%20%3CSPAN%3Eimport%3C%2FSPAN%3E%20%3CSPAN%3EIpAddress%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%20%3CSPAN%3EHost%3C%2FSPAN%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOnce%20you%20have%20the%20entity%20loaded%2C%20you%20can%20use%20the%20%3CEM%3Eget_pivot_list%3C%2FEM%3E()%20function%20to%20see%20which%20pivot%20functions%20are%20available%20for%20it.%20The%20example%20below%20has%20been%20abbreviated%20for%20space%20reasons.%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20IpAddress%3C%2FSPAN%3E%3CSPAN%3E.%3C%2FSPAN%3E%3CSPAN%3Eget_pivot_list%3C%2FSPAN%3E%3CSPAN%3E()%3CBR%20%2F%3E%3C%2FSPAN%3E%5B'AzureSentinel.SecurityAlert_list_alerts_for_ip'%2C%3CBR%20%2F%3E'AzureSentinel.SigninLogs_list_aad_signins_for_ip'%2C%3CBR%20%2F%3E'AzureSentinel.AzureActivity_list_azure_activity_for_ip'%2C%3CBR%20%2F%3E'AzureSentinel.AzureNetworkAnalytics_CL_list_azure_network_flows_by_ip'%2C%3CBR%20%2F%3E...%3CBR%20%2F%3E'ti.lookup_ip'%2C%3CBR%20%2F%3E'ti.lookup_ipv4'%2C%3CBR%20%2F%3E'ti.lookup_ipv4_OTX'%2C%3CBR%20%2F%3E...%3CBR%20%2F%3E'ti.lookup_ipv6_OTX'%2C%20%3CBR%20%2F%3E'util.whois'%2C%20%3CBR%20%2F%3E'util.ip_type'%2C%20%3CBR%20%2F%3E'util.ip_rev_resolve'%2C%20%3CBR%20%2F%3E'util.geoloc_mm'%2C%20%3CBR%20%2F%3E'util.geoloc_ips'%5D%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESome%20of%20the%20function%20names%20are%20a%20little%20unwieldy%20but%2C%20in%20many%20cases%2C%20this%20is%20necessary%20to%20avoid%20name%20collisions.%20You%20will%20notice%20from%20the%20list%20that%20the%20functions%20are%20grouped%20into%20containers%3A%20%22AzureSentinel%22%2C%20%22ti%22%20and%20%22util%22%20in%20the%20above%20example.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAlthough%20this%20makes%20the%20function%20name%20even%20longer%2C%20we%20thought%20that%20this%20helped%20to%20keep%20related%20functionality%20together%20-%20so%20you%20don't%20get%20a%20TI%20lookup%20function%2C%20when%20you%20thought%20you%20were%20running%20a%20query.%3C%2FP%3E%0A%3CP%3EFortunately%2C%20Jupyter%20notebooks%2FIPython%20support%20tab%20completion%20so%20you%20should%20not%20normally%20have%20to%20remember%20these%20names.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Tab-Completion.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F256264iF188CDFEFDD0DA66%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Tab-Completion.png%22%20alt%3D%22Tab-Completion.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20containers%20(%22AzureSentinel%22%2C%20%22util%22%2C%20etc.)%20are%20also%20callable%20functions%20-%20they%20just%20return%20the%20list%20of%20functions%20they%20contain.%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20IpAddress%3C%2FSPAN%3E%3CSPAN%3E.%3C%2FSPAN%3E%3CSPAN%3Eutil%3C%2FSPAN%3E%3CSPAN%3E()%3CBR%20%2F%3E%3C%2FSPAN%3Ewhois%20functionip_type%20functionip_rev_resolve%20functiongeoloc_mm%20functiongeoloc_ips%20function%3C%2FPRE%3E%0A%3CP%3ENow%20we're%20ready%20to%20run%20any%20of%20the%20functions%20for%20this%20entity%20(we%20take%20the%20same%20initial%20examples%20from%20the%20%22Life%20before%20pivot%20functions%22%20plus%20a%20few%20more).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20IpAddress%3C%2FSPAN%3E%3CSPAN%3E.%3C%2FSPAN%3E%3CSPAN%3Eutil%3C%2FSPAN%3E%3CSPAN%3E.%3C%2FSPAN%3E%3CSPAN%3Eip_type%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3Eip_addr%3C%2FSPAN%3E%3CSPAN%3E)%3C%2FSPAN%3E%3C%2FPRE%3E%0A%3CTABLE%3E%0A%3CTHEAD%3E%0A%3CTR%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3Eip%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3Eresult%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTHEAD%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3E0%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E20.72.193.242%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EPublic%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%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TD%20width%3D%22301%22%3E%3CP%3E%7B'verbose_msg'%3A%20'Missing%20IP%20address'%2C%20'response_code'%3A%200%7D%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3E0%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E20.72.193.242%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3Eipv4%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E20.72.193.242%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3ENone%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EXForce%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3ETrue%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3Ewarning%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22301%22%3E%3CP%3E%7B'score'%3A%201%2C%20'cats'%3A%20%7B%7D%2C%20'categoryDescriptions'%3A%20%7B%7D%2C%20'reason'%3A%20'Regional%20Internet%20Registry'%2C%20're...%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENotice%20that%20we%20didn't%20need%20to%20worry%20about%20either%20the%20parameter%20name%20or%20format%20(more%20on%20this%20in%20the%20next%20section).%20Also%2C%20whatever%20the%20function%2C%20the%20output%20is%20always%20returned%20as%20a%20pandas%20%3CEM%3EDataFrame%3C%2FEM%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--2087651142%22%20id%3D%22toc-hId--2088545025%22%3EFor%20Data%20query%20functions%20you%20%3CEM%3Edo%3C%2FEM%3E%20need%20to%20worry%20about%20the%20parameter%20name%3C%2FH3%3E%0A%3CP%3EData%20query%20functions%20are%20slightly%20more%20complex%20than%20most%20other%20functions%20and%20specifically%20often%20support%20many%20parameters.%20Rather%20than%20try%20to%20guess%20which%20parameter%20you%20meant%2C%20we%20require%20you%20to%20be%20explicit%20about%20it.%3C%2FP%3E%0A%3CP%3EBefore%20we%20can%20use%20a%20data%20query%2C%20we%20need%20to%20authenticate%20to%20the%20provider.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20az_provider%3C%2FSPAN%3E%3CSPAN%3E.%3C%2FSPAN%3E%3CSPAN%3Econnect%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3EWorkspaceConfig%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3Eworkspace%3C%2FSPAN%3E%3CSPAN%3E%3D%3C%2FSPAN%3E%3CSPAN%3E%22CyberSecuritySoc%22%3C%2FSPAN%3E%3CSPAN%3E)%3C%2FSPAN%3E%3CSPAN%3E.%3C%2FSPAN%3E%3CSPAN%3Ecode_connect_str%3C%2FSPAN%3E%3CSPAN%3E)%3C%2FSPAN%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20are%20not%20sure%20of%20the%20parameters%20required%20by%20the%20query%20you%20can%20use%20the%20built-in%20help%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20%3C%2FSPAN%3EHost.AzureSentinel.SecurityAlert_list_related_alerts%3CSPAN%3E%3F%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%3ESignature%3A%3C%2FSPAN%3E%20Host%3CSPAN%3E.%3C%2FSPAN%3EAzureSentinel%3CSPAN%3E.%3C%2FSPAN%3ESecurityAlert_list_related_alerts%3CSPAN%3E(*%3C%2FSPAN%3Eargs%3CSPAN%3E%2C%3C%2FSPAN%3E%20%3CSPAN%3E**%3C%2FSPAN%3Ekwargs%3CSPAN%3E)%3C%2FSPAN%3E%20%3CSPAN%3E-%26gt%3B%3C%2FSPAN%3E%20Union%3CSPAN%3E%5B%3C%2FSPAN%3Epandas%3CSPAN%3E.%3C%2FSPAN%3Ecore%3CSPAN%3E.%3C%2FSPAN%3Eframe%3CSPAN%3E.%3C%2FSPAN%3EDataFrame%3CSPAN%3E%2C%3C%2FSPAN%3E%20Any%3CSPAN%3E%5D%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%3EDocstring%3A%3CBR%20%2F%3E%3C%2FSPAN%3ERetrieves%20list%20of%20alerts%20with%20a%20common%20host%2C%20account%20or%20process%3CBR%20%2F%3EParameters%3CBR%20%2F%3E----------%3CBR%20%2F%3Eaccount_name%3A%20str%20(optional)%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20The%20account%20name%20to%20find%3CBR%20%2F%3Eadd_query_items%3A%20str%20(optional)%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Additional%20query%20clauses%3CBR%20%2F%3Eend%3A%20datetime%20(optional)%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Query%20end%20time%3CBR%20%2F%3Ehost_name%3A%20str%20(optional)%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20The%20hostname%20to%20find%3CBR%20%2F%3Epath_separator%3A%20str%20(optional)%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Path%20separator%26nbsp%3B%26nbsp%3B%26nbsp%3B%20(default%20value%20is%3A%20%5C%5C)%3CBR%20%2F%3Eprocess_name%3A%20str%20(optional)%26nbsp%3B...%3C%2FPRE%3E%0A%3CP%3E%3CSPAN%3EIn%20this%20case%20we%20want%20the%20%22host_name%22%20parameter.%3C%2FSPAN%3E%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G%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3EVendorName%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3EVendorOriginalId%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3ESystemAlertId%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3EResourceId%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3ESourceComputerId%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3EAlertType%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3EConfidenceLevel%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3EConfidenceScore%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3EIsIncident%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3EStartTimeUtc%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3EEndTimeUtc%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3EProcessingEndTime%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3ERemediationSteps%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3EExtendedProperties%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3EEntities%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3ESourceSystem%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3EWorkspaceSubscriptionId%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3EWorkspaceResourceGroup%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3EExtendedLinks%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3EProductName%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3EProductComponentName%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3EAlertLink%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3EStatus%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3ECompromisedEntity%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3ETactics%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3EType%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3EComputer%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3Esrc_hostname%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3Esrc_accountname%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3Esrc_procname%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3Ehost_match%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3Eacct_match%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3Eproc_match%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTHEAD%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3E0%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E8ecf8077-cf51-4820-aadd-14040956f35d%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E2020-12-10%2009%3A10%3A08%2B00%3A00%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3ESuspected%20credential%20theft%20activity%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3ESuspected%20credential%20theft%20activity%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EMedium%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EThis%20program%20exhibits%20suspect%20characteristics%20potentially%20associated%20with%20credential%20theft.%20Onc...%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EMDATP%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EMicrosoft%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3Eda637426874826633442_-1480645585%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3Ea429998b-8a1f-a69c-f2b8-24dedde31c2d%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%3CP%3EWindowsDefenderAtp%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%3CP%3ENaN%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EFalse%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E2020-12-04%2014%3A00%3A00%2B00%3A00%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E2020-12-04%2014%3A00%3A00%2B00%3A00%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E2020-12-10%2009%3A10%3A08%2B00%3A00%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%5B%5Cr%5Cn%20%221.%20Make%20sure%20the%20machine%20is%20completely%20updated%20and%20all%20your%20software%20has%20the%20latest%20patc...%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%7B%5Cr%5Cn%20%22MicrosoftDefenderAtp.Category%22%3A%20%22CredentialAccess%22%2C%5Cr%5Cn%20%22MicrosoftDefenderAtp.Investiga...%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%5B%5Cr%5Cn%20%7B%5Cr%5Cn%20%22%24id%22%3A%20%224%22%2C%5Cr%5Cn%20%22DnsDomain%22%3A%20%22na.contosohotels.com%22%2C%5Cr%5Cn%20%22HostName%22%3A%20%22vict...%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EDetection%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%3CP%3EMicrosoft%20Defender%20Advanced%20Threat%20Protection%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fsecuritycenter.microsoft.com%2Falert%2Fda637426874826633442_-1480645585%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsecuritycenter.microsoft.com%2Falert%2Fda637426874826633442_-1480645585%3C%2FA%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3ENew%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3Evictim00.na.contosohotels.com%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3ECredentialAccess%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3ESecurityAlert%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3Evictim00%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3Evictim00%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%3CP%3ETrue%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EFalse%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EFalse%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3E1%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E8ecf8077-cf51-4820-aadd-14040956f35d%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E2020-12-10%2009%3A10%3A08%2B00%3A00%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E'Mimikatz'%20hacktool%20was%20detected%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E'Mimikatz'%20hacktool%20was%20detected%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3ELow%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EReadily%20available%20tools%2C%20such%20as%20hacking%20programs%2C%20can%20be%20used%20by%20unauthorized%20individuals%20to%20sp...%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EMDATP%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EMicrosoft%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3Eda637426874826014018_-1390662053%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3Eedb68e6d-012d-4c6b-7408-20e679fb41c8%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%3CP%3EWindowsDefenderAv%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%3CP%3ENaN%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EFalse%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E2020-12-04%2014%3A00%3A01%2B00%3A00%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E2020-12-04%2014%3A00%3A01%2B00%3A00%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E2020-12-10%2009%3A10%3A08%2B00%3A00%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%5B%5Cr%5Cn%20%221.%20Make%20sure%20the%20machine%20is%20completely%20updated%20and%20all%20your%20software%20has%20the%20latest%20patc...%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%7B%5Cr%5Cn%20%22MicrosoftDefenderAtp.Category%22%3A%20%22Malware%22%2C%5Cr%5Cn%20%22MicrosoftDefenderAtp.InvestigationId%22%3A%20...%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%5B%5Cr%5Cn%20%7B%5Cr%5Cn%20%22%24id%22%3A%20%224%22%2C%5Cr%5Cn%20%22DnsDomain%22%3A%20%22na.contosohotels.com%22%2C%5Cr%5Cn%20%22HostName%22%3A%20%22vict...%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EDetection%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%3CP%3EMicrosoft%20Defender%20Advanced%20Threat%20Protection%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fsecuritycenter.microsoft.com%2Falert%2Fda637426874826014018_-1390662053%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsecuritycenter.microsoft.com%2Falert%2Fda637426874826014018_-1390662053%3C%2FA%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3ENew%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3Evictim00.na.contosohotels.com%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EUnknown%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3ESecurityAlert%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3Evictim00%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3Evictim00%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%3CP%3ETrue%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EFalse%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EFalse%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3E2%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E8ecf8077-cf51-4820-aadd-14040956f35d%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E2020-12-10%2009%3A10%3A08%2B00%3A00%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EMalicious%20credential%20theft%20tool%20execution%20detected%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EMalicious%20credential%20theft%20tool%20execution%20detected%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EHigh%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EA%20known%20credential%20theft%20tool%20execution%20command%20line%20was%20detected.%5CnEither%20the%20process%20itself%20or...%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EMDATP%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EMicrosoft%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3Eda637426874824572229_-192666782%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E39912e77-045b-a082-a91e-8a18958d1b1c%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%3CP%3EWindowsDefenderAtp%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%3CP%3ENaN%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EFalse%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E2020-12-04%2014%3A00%3A00%2B00%3A00%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E2020-12-04%2014%3A00%3A00%2B00%3A00%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E2020-12-10%2009%3A10%3A08%2B00%3A00%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%5B%5Cr%5Cn%20%221.%20Make%20sure%20the%20machine%20is%20completely%20updated%20and%20all%20your%20software%20has%20the%20latest%20patc...%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%7B%5Cr%5Cn%20%22MicrosoftDefenderAtp.Category%22%3A%20%22CredentialAccess%22%2C%5Cr%5Cn%20%22MicrosoftDefenderAtp.Investiga...%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%5B%5Cr%5Cn%20%7B%5Cr%5Cn%20%22%24id%22%3A%20%224%22%2C%5Cr%5Cn%20%22DnsDomain%22%3A%20%22na.contosohotels.com%22%2C%5Cr%5Cn%20%22HostName%22%3A%20%22vict...%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EDetection%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%3CP%3EMicrosoft%20Defender%20Advanced%20Threat%20Protection%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fsecuritycenter.microsoft.com%2Falert%2Fda637426874824572229_-192666782%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsecuritycenter.microsoft.com%2Falert%2Fda637426874824572229_-192666782%3C%2FA%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3ENew%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3Evictim00.na.contosohotels.com%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3ECredentialAccess%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3ESecurityAlert%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3Evictim00%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3Evictim00%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%3CP%3ETrue%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EFalse%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EFalse%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EShown%20below%20is%20a%20preview%20of%20a%20notebook%20tool%20that%20lets%20you%20browser%20around%20entities%20and%20their%20pivot%20functions%2C%20search%20for%20a%20function%20by%20keyword%20and%20view%20the%20help%20for%20that%20function.%20This%20is%20going%20to%20be%20released%20shortly.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20%3C%2FSPAN%3EPivot.browse()%3C%2FPRE%3E%0A%3CP%3E%3CSTRONG%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22PivotBrowser.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F256263iE910C3DA19F9C51F%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22PivotBrowser.png%22%20alt%3D%22PivotBrowser.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--2098154246%22%20id%3D%22toc-hId--2099048129%22%3E%26nbsp%3B%3C%2FH2%3E%0A%3CH2%20id%3D%22toc-hId-389358587%22%20id%3D%22toc-hId-388464704%22%3E%3CSTRONG%3EStandardized%20way%20of%20calling%20Pivot%20functions%3C%2FSTRONG%3E%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDue%20to%20various%20factors%20(historical%2C%20underlying%20data%2C%20developer%20laziness%20and%20forgetfulness%2C%20etc.)%20the%20functionality%20in%20%3CEM%3EMSTICPy%3C%2FEM%3E%20can%20be%20inconsistent%20in%20the%20way%20it%20uses%20input%20parameters.%3C%2FP%3E%0A%3CP%3EAlso%2C%20many%20functions%20will%20only%20accept%20inputs%20as%20a%20single%20value%2C%20or%20a%20list%20or%20a%20DataFrame%20or%20some%20unpredictable%20combination%20of%20these.%3C%2FP%3E%0A%3CP%3EPivot%20functions%20allow%20you%20to%20largely%20forget%20about%20this%20-%20you%20can%20use%20the%20same%20function%20whether%20you%20have%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3Ea%20single%20value%3C%2FLI%3E%0A%3CLI%3Ea%20list%20of%20values%26nbsp%3B(or%20any%20Python%20iterable%2C%20such%20as%20a%20tuple%20or%20even%20a%20generator%20function)%26nbsp%3B%3C%2FLI%3E%0A%3CLI%3Ea%20DataFrame%20with%20the%20input%20value%20in%20one%20of%20the%20columns.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3ELet's%20take%20an%20example.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESuppose%20we%20have%20a%20set%20of%20IP%20addresses%20pasted%20from%20somewhere%20that%20we%20want%20to%20use%20as%20input.%3C%2FP%3E%0A%3CP%3EWe%20need%20to%20convert%20this%20into%20a%20Python%20data%20object%20of%20some%20sort.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20do%20this%20we%20can%20use%20another%20Pivot%20utility%20%3CEM%3E%25%25txt2df.%3C%2FEM%3E%20This%20is%20a%20Jupyter%2FIPython%20magic%20function%20-%20to%20use%20it%2C%20just%20paste%20you%20data%20in%20a%20cell%20that%20you%20want%20to%20import%20into%20an%20empty.%20Use%3C%2FP%3E%0A%3CPRE%3E%20%25%25txt2df%20--help%3C%2FPRE%3E%0A%3CP%3Ein%20an%20empty%20cell%20to%20see%20the%20full%20syntax.%3C%2FP%3E%0A%3CP%3EIn%20the%20example%20below%2C%20we%20specify%20a%20comma%20separator%2C%20that%20the%20data%20has%20a%20headers%20row%20and%20to%20save%20the%20converted%20data%20as%20a%20DataFrame%20named%20%22ip_df%22.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EWarning%3C%2FSTRONG%3E%26nbsp%3Bif%20you%20specify%20the%20%22--name%22%20parameter%2C%20this%20will%20overwrite%20any%20existing%20variable%20of%20this%20name.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%25%25txt2df%20--sep%20%2C%20--headers%20--name%20ip_df%3CBR%20%2F%3Eidx%2C%20ip%2C%20type%3CBR%20%2F%3E0%2C%20172.217.15.99%2C%20Public%3CBR%20%2F%3E1%2C%2040.85.232.64%2C%20Public%3CBR%20%2F%3E2%2C%2020.38.98.100%2C%20Public%3CBR%20%2F%3E3%2C%2023.96.64.84%2C%20Public%3CBR%20%2F%3E4%2C%2065.55.44.108%2C%20Public%3CBR%20%2F%3E5%2C%20131.107.147.209%2C%20Public%3CBR%20%2F%3E6%2C%2010.0.3.4%2C%20Private%3CBR%20%2F%3E7%2C%2010.0.3.5%2C%20Private%3CBR%20%2F%3E8%2C%2013.82.152.48%2C%20Public%3C%2FPRE%3E%0A%3CTABLE%3E%0A%3CTHEAD%3E%0A%3CTR%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3Eidx%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3Eip%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3Etype%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTHEAD%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3E0%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E0%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E172.217.15.99%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EPublic%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3E1%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E1%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E40.85.232.64%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EPublic%3C%2FP%3E%0A%3C%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3CTD%3E%3CP%3E6%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E10.0.3.4%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EPrivate%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3E7%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E7%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E10.0.3.5%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EPrivate%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3E8%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E8%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E13.82.152.48%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EPublic%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20demonstration%20purposes%2C%20we'll%20also%20create%20a%20standard%20Python%20list%20from%20the%20%22ip%22%20column%20of%20the%20DataFrame.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20%3C%2FSPAN%3Eip_list%20%3D%20list(ip_df.ip)%3CBR%20%2F%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20%3C%2FSPAN%3Eprint(ip_list)%3CBR%20%2F%3E%5B'172.217.15.99'%2C%20'40.85.232.64'%2C%20'20.38.98.100'%2C%20'23.96.64.84'%2C%20'65.55.44.108'%2C%20'131.107.147.209'%2C%20'10.0.3.4'%2C%20'10.0.3.5'%2C%20'13.82.152.48'%5D%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EHow%20did%20this%20work%20before%3F%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EIf%20you%20recall%20the%20earlier%20example%20of%20%3CEM%3Eget_ip_type%3C%2FEM%3E%2C%20passing%20it%20a%20list%20or%20DataFrame%20doesn't%20result%20in%20anything%20useful.%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20%3C%2FSPAN%3Eget_ip_type(ip_list)%3CBR%20%2F%3E%5B'172.217.15.99'%2C%20'40.85.232.64'%2C%20'20.38.98.100'%2C%20'23.96.64.84'%2C%20'65.55.44.108'%2C%20'131.107.147.209'%2C%20'10.0.3.4'%2C%20'10.0.3.5'%2C%20'13.82.152.48'%5D%3CBR%20%2F%3Edoes%20not%20appear%20to%20be%20an%20IPv4%20or%20IPv6%20address%3CBR%20%2F%3E'Unspecified'%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EPivot%20versions%20are%20(somewhat)%20agnostic%20to%20input%20data%20format%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EHowever%2C%20the%20%22pivotized%22%20version%20can%20accept%20and%20correctly%20process%20a%20list.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20%3C%2FSPAN%3EIpAddress.util.ip_type(ip_list)%3C%2FPRE%3E%0A%3CTABLE%3E%0A%3CTHEAD%3E%0A%3CTR%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3Eip%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTR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E%0A%3CTR%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3E5%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E131.107.147.209%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EPublic%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3E6%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E10.0.3.4%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EPrivate%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3E7%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E10.0.3.5%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EPrivate%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3E8%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E13.82.152.48%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EPublic%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20the%20case%20of%20a%20DataFrame%2C%20we%20have%20to%20tell%20the%20function%20the%20name%20of%20the%20column%20that%20contains%20the%20input%20data.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20%3C%2FSPAN%3EIpAddress.util.whois(ip_df)%26nbsp%3B%20%23%20won't%20work!%3CBR%20%2F%3E---------------------------------------------------------------------------%3CBR%20%2F%3EKeyError%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Traceback%20(most%20recent%20call%20last)%3CBR%20%2F%3E%3CIPYTHON-INPUT-32-DEBF57D805C7%3E%20in%20%3CMODULE%3E%3CBR%20%2F%3E...%3CBR%20%2F%3E%20%20%20%20173%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20input_df%2C%20input_column%2C%20param_dict%20%3D%20_create_input_df(%3CBR%20%2F%3E--%26gt%3B%20174%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20input_value%2C%20pivot_reg%2C%20parent_kwargs%3Dkwargs%3CBR%20%2F%3E%20%26nbsp%3B%26nbsp%3B%20175%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20)%3CBR%20%2F%3E...%3CBR%20%2F%3EKeyError%3A%20(%22'ip_column'%20is%20not%20in%20the%20input%20dataframe%22%2C%20%3CBR%20%2F%3E'Please%20specify%20the%20column%20when%20calling%20the%20function.%3CBR%20%2F%3EYou%20can%20use%20one%20of%20the%20parameter%20names%20for%20this%3A'%2C%20%5B'column'%2C%20'input_column'%2C%20'input_col'%2C%20'src_column'%2C%20'src_col'%5D)%3C%2FMODULE%3E%3C%2FIPYTHON-INPUT-32-DEBF57D805C7%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20%3C%2FSPAN%3Eentities.IpAddress.util.whois(ip_df%2C%20column%3D%22ip%22)%26nbsp%3B%20%23%20correct%3C%2FPRE%3E%0A%3CTABLE%20width%3D%22914px%22%3E%0A%3CTHEAD%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2243.1746px%22%3E%3CP%3E%3CSTRONG%3Enir%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22100.952px%22%3E%3CP%3E%3CSTRONG%3Easn_registry%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2253.9683px%22%3E%3CP%3E%3CSTRONG%3Easn%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22122.54px%22%3E%3CP%3E%3CSTRONG%3Easn_cidr%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22144.127px%22%3E%3CP%3E%3CSTRONG%3Easn_country_code%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2276.1905px%22%3E%3CP%3E%3CSTRONG%3Easn_date%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22127.619px%22%3E%3CP%3E%3CSTRONG%3Easn_description%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22120px%22%3E%3CP%3E%3CSTRONG%3Equery%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22124.444px%22%3E%3CP%3E%3CSTRONG%3Enets%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTHEAD%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2243.1746px%22%3E%3CP%3ENaN%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22100.952px%22%3E%3CP%3Earin%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2253.9683px%22%3E%3CP%3E15169%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22122.54px%22%3E%3CP%3E172.217.15.0%2F24%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22144.127px%22%3E%3CP%3EUS%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2276.1905px%22%3E%3CP%3E2012-04-16%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22127.619px%22%3E%3CP%3EGOOGLE%2C%20US%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22120px%22%3E%3CP%3E172.217.15.99%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22124.444px%22%3E%3CP%3E%5B%7B'cidr'%3A%20'172.217.0.0%2F16'%2C%20'name'%3A%20'GOOGLE'%2C%20'handle'%3A%20'NET-172-217-0-0-1'%2C%20'range'%3A%20'172.217.0...%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2243.1746px%22%3E%3CP%3ENaN%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22100.952px%22%3E%3CP%3Earin%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2253.9683px%22%3E%3CP%3E8075%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22122.54px%22%3E%3CP%3E40.80.0.0%2F12%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22144.127px%22%3E%3CP%3EUS%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2276.1905px%22%3E%3CP%3E2015-02-23%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22127.619px%22%3E%3CP%3EMICROSOFT-CORP-MSN-AS-BLOCK%2C%20US%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22120px%22%3E%3CP%3E40.85.232.64%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22124.444px%22%3E%3CP%3E%5B%7B'cidr'%3A%20'40.80.0.0%2F12%2C%2040.124.0.0%2F16%2C%2040.125.0.0%2F17%2C%2040.74.0.0%2F15%2C%2040.120.0.0%2F14%2C%2040.76.0.0%2F14...%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2243.1746px%22%3E%3CP%3ENaN%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22100.952px%22%3E%3CP%3ENaN%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2253.9683px%22%3E%3CP%3ENaN%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22122.54px%22%3E%3CP%3ENaN%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22144.127px%22%3E%3CP%3ENaN%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2276.1905px%22%3E%3CP%3ENaN%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22127.619px%22%3E%3CP%3ENaN%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22120px%22%3E%3CP%3ENaN%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22124.444px%22%3E%3CP%3ENaN%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2243.1746px%22%3E%3CP%3ENaN%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22100.952px%22%3E%3CP%3ENaN%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2253.9683px%22%3E%3CP%3ENaN%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22122.54px%22%3E%3CP%3ENaN%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22144.127px%22%3E%3CP%3ENaN%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2276.1905px%22%3E%3CP%3ENaN%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22127.619px%22%3E%3CP%3ENaN%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22120px%22%3E%3CP%3ENaN%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22124.444px%22%3E%3CP%3ENaN%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ENote%3C%2FSTRONG%3E%3A%20for%20most%20functions%20you%20can%20ignore%20the%20parameter%20name%20and%20just%20specify%20it%20as%20a%20positional%20parameter.%20You%20can%20also%20use%20the%20original%20parameter%20name%20of%20the%20underlying%20function%20or%20the%20placeholder%20name%20%22value%22.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20following%20are%20all%20equivalent%3A%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20%3C%2FSPAN%3EIpAddress%3CSTRONG%3E.%3C%2FSTRONG%3Eutil%3CSTRONG%3E.%3C%2FSTRONG%3Eip_type(ip_list)%3CBR%20%2F%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20%3C%2FSPAN%3EIpAddress%3CSTRONG%3E.%3C%2FSTRONG%3Eutil%3CSTRONG%3E.%3C%2FSTRONG%3Eip_type(ip_str%3CSTRONG%3E%3D%3C%2FSTRONG%3Eip_list)%3CBR%20%2F%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20%3C%2FSPAN%3EIpAddress%3CSTRONG%20style%3D%22white-space%3A%20normal%3B%22%3E.%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-family%3A%20Menlo%2C%20Monaco%2C%20Consolas%2C%20'Courier%20New'%2C%20monospace%3B%20white-space%3A%20normal%3B%22%3Eutil%3C%2FSPAN%3E%3CSTRONG%20style%3D%22white-space%3A%20normal%3B%22%3E.%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-family%3A%20Menlo%2C%20Monaco%2C%20Consolas%2C%20'Courier%20New'%2C%20monospace%3B%20white-space%3A%20normal%3B%22%3Eip_type(value%3C%2FSPAN%3E%3CSTRONG%20style%3D%22white-space%3A%20normal%3B%22%3E%3D%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-family%3A%20Menlo%2C%20Monaco%2C%20Consolas%2C%20'Courier%20New'%2C%20monospace%3B%20white-space%3A%20normal%3B%22%3Eip_list)%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20%3C%2FSPAN%3EIpAddress%3CSTRONG%20style%3D%22white-space%3A%20normal%3B%22%3E.%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-family%3A%20Menlo%2C%20Monaco%2C%20Consolas%2C%20'Courier%20New'%2C%20monospace%3B%20white-space%3A%20normal%3B%22%3Eutil%3C%2FSPAN%3E%3CSTRONG%20style%3D%22white-space%3A%20normal%3B%22%3E.%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-family%3A%20Menlo%2C%20Monaco%2C%20Consolas%2C%20'Courier%20New'%2C%20monospace%3B%20white-space%3A%20normal%3B%22%3Eip_type(data%3C%2FSPAN%3E%3CSTRONG%20style%3D%22white-space%3A%20normal%3B%22%3E%3D%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-family%3A%20Menlo%2C%20Monaco%2C%20Consolas%2C%20'Courier%20New'%2C%20monospace%3B%20white-space%3A%20normal%3B%22%3Eip_list)%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20Menlo%2C%20Monaco%2C%20Consolas%2C%20'Courier%20New'%2C%20monospace%3B%20white-space%3A%20normal%3B%22%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FPRE%3E%0A%3CP%3EWhen%20passing%20both%20a%20DataFrame%20and%20column%20name%20use%3A%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20%3C%2FSPAN%3EIpAddress%3CSTRONG%3E.%3C%2FSTRONG%3Eutil%3CSTRONG%3E.%3C%2FSTRONG%3Eip_type(data%3CSTRONG%3E%3D%3C%2FSTRONG%3Eip_df%2C%20column%3CSTRONG%3E%3D%3C%2FSTRONG%3E%22col_name%22)%3C%2FPRE%3E%0A%3CP%3EYou%20can%20also%20pass%20an%20entity%20instance%20of%20an%20entity%20as%20a%20input%20parameter.%20The%20pivot%20code%20knows%20which%20attribute%20or%20attributes%20of%20an%20entity%20will%20provider%20the%20input%20value.%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20%3C%2FSPAN%3Eip_entity%20%3D%20IpAddress(Address%3D%2240.85.232.64%22)%3CBR%20%2F%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20%3C%2FSPAN%3EIpAddress.util.ip_type(ip_entity)%3C%2FPRE%3E%0A%3CTABLE%3E%0A%3CTHEAD%3E%0A%3CTR%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3Eip%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3Eresult%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTHEAD%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3E0%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E40.85.232.64%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EPublic%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EIterable%2FDataFrame%20inputs%20and%20single-value%20functions%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EMany%20of%20the%20underlying%20functions%20only%20accept%20single%20values%20as%20inputs.%20Examples%20of%20these%20are%20the%20data%20query%20functions%20-%20typically%20they%20expect%20a%20single%20host%20name%2C%20IP%20address%2C%20etc.%3C%2FP%3E%0A%3CP%3EPivot%20knows%20about%20the%20type%20of%20parameters%20that%20the%20function%20accepts.%20It%20will%20adjust%20the%20input%20to%20match%20the%20expectations%20of%20the%20underlying%20function.%20If%20a%20list%20or%20DataFrame%20is%20passed%20as%20input%20to%20a%20single-value%20function%20Pivot%20will%20split%20the%20input%20and%20call%20the%20function%20once%20for%20each%20value.%20It%20then%20combines%20the%20output%20into%20a%20single%20DataFrame%20before%20returning%20the%20results.%3C%2FP%3E%0A%3CP%3EYou%20can%20read%20a%20bit%20more%20about%20how%20this%20is%20done%20in%20the%20Appendix%20-%20%22how%20do%20pivot%20wrappers%20work%3F%22%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EData%20queries%20-%20where%20does%20the%20time%20range%20come%20from%3F%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EThe%20Pivot%20class%20has%20a%20built-in%20time%20range%2C%20which%20is%20used%20by%20default%20for%20all%20queries.%20Don't%20worry%20-%20you%20can%20change%20it%20easily.%3C%2FP%3E%0A%3CP%3ETo%20see%20the%20current%20time%20setting%3A%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20%3C%2FSPAN%3EPivot.current.timespan%3CBR%20%2F%3ETimeStamp(start%3D2021-02-15%2021%3A01%3A40.381864%2C%20end%3D2021-02-16%2021%3A01%3A40.381864%2C%20period%3D-1%20day%2C%200%3A00%3A00)%3C%2FPRE%3E%0A%3CP%3E%3CSTRONG%3ENote%3C%2FSTRONG%3E%3A%20%22Pivot.current%22%20gives%20you%20access%20to%20the%20last%20created%20instance%20of%20the%20Pivot%20class%20-%20if%20you've%20created%20multiple%20instances%20of%20Pivot%20(which%20you%20rarely%20need%20to%20do)%2C%20you%20can%20always%20get%20to%20the%20last%20one%20you%20created%20using%20this%20class%20attribute.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20edit%20the%20time%20range%20interactively%3C%2FP%3E%0A%3CPRE%3EPivot.current.edit_query_time()%3C%2FPRE%3E%0A%3CP%3EOr%20by%20setting%20the%20timespan%20property%20directly.%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20%3C%2FSPAN%3Efrom%20msticpy.common.timespan%20import%20TimeSpan%3CBR%20%2F%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20%3C%2FSPAN%3E%23%20TimeSpan%20accepts%20datetimes%20or%20datestrings%3CBR%20%2F%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20%3C%2FSPAN%3Etimespan%20%3D%20TimeSpan(start%3D%2202%2F01%2F2021%22%2C%20end%3D%2202%2F15%2F2021%22)%3CBR%20%2F%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20%3C%2FSPAN%3EPivot.current.timespan%20%3D%20timespan%3CBR%20%2F%3ETimeStamp(start%3D2021-02-01%2000%3A00%3A00%2C%20end%3D2021-02-15%2000%3A00%3A00%2C%20period%3D-14%20days%20%2B00%3A00%3A00)%3C%2FPRE%3E%0A%3CP%3EIn%20an%20upcoming%20release%20there%20is%20also%20a%20convenience%20function%20for%20setting%20the%20time%20directly%20with%20Python%20datetimes%20or%20date%20strings.%3C%2FP%3E%0A%3CPRE%3EPivot.current.set_timespan(start%3D%222020-02-06%2003%3A00%3A00%22%2C%20end%3D%222021-02-15%2001%3A42%3A42%22)%3C%2FPRE%3E%0A%3CP%3EYou%20can%20also%20override%20the%20built-in%20time%20settings%20by%20specifying%20%3CEM%3Estart%3C%2FEM%3E%20and%20%3CEM%3Eend%3C%2FEM%3E%20as%20parameters%20to%20the%20query%20function.%3C%2FP%3E%0A%3CPRE%3EHost.AzureSentinel.SecurityAlert_list_related_alerts(host_name%3D%22victim00%22%2C%20start%3Ddt1%2C%20end%3Ddt2)%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ESupplying%20extra%20parameters%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EThe%20Pivot%20layer%20will%20pass%20any%20unused%20keyword%20parameters%20to%20the%20underlying%20function.%20This%20%3CEM%3Edoes%20not%3C%2FEM%3E%20usually%20apply%20to%20positional%20parameters%20-%20if%20you%20want%20parameters%20to%20get%20to%20the%20function%2C%20you%20have%20to%20name%20them%20explicitly.%20In%20this%20example%20the%20%3CEM%3Eadd_query_items%3C%2FEM%3E%20parameter%20is%20passed%20to%20the%20underlying%20query%20function%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20%3C%2FSPAN%3Eentities.Host.AzureSentinel.SecurityEvent_list_host_logons(%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%20%20%20%20host_name%3D%22victimPc%22%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%20%20%20%20add_query_items%3D%22%7C%20summ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E%0A%3CTR%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3E4%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E10%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E58%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3E5%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E9%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E8%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3E6%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E0%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E19%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3E7%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E11%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E1%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-255673863%22%20id%3D%22toc-hId-254779980%22%3E%26nbsp%3B%3C%2FH2%3E%0A%3CH2%20id%3D%22toc-hId--1551780600%22%20id%3D%22toc-hId--1552674483%22%3E%3CSTRONG%3EPivot%20Pipelines%3C%2FSTRONG%3E%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBecause%20all%20pivot%20functions%20accept%20DataFrames%20as%20input%20and%20produce%20DataFrames%20as%20output%2C%20it%20means%20that%20it%20is%20possible%20to%20chain%20pivot%20functions%20into%20a%20pipeline.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1064814952%22%20id%3D%22toc-hId-1063921069%22%3E%3CSTRONG%3EJoining%20input%20to%20output%3C%2FSTRONG%3E%3C%2FH3%3E%0A%3CP%3EYou%20can%20join%20the%20input%20to%20the%20output.%20This%20usually%20only%20makes%20sense%20when%20the%20input%20is%20a%20DataFrame.%20It%20lets%20you%20keep%20the%20previously%20accumulated%20results%20and%20tag%20on%20the%20additional%20columns%20produced%20by%20the%20pivot%20function%20you%20are%20calling.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20join%20parameter%20supports%20%22inner%22%2C%20%22left%22%2C%20%22right%22%20and%20%22outer%22%20joins%20(be%20careful%20with%20the%20latter%20though!)%20See%20%3CA%20href%3D%22https%3A%2F%2Fmsticpy.readthedocs.io%2Fen%2Flatest%2Fdata_analysis%2FPivotFunctions.html%23joining-input-to-output-data%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Epivot%20joins%20documentation%3C%2FA%3E%26nbsp%3Bfor%20more%20details.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAlthough%20joining%20is%20useful%20in%20pipelines%20you%20can%20use%20it%20on%20any%20function%20whether%20in%20a%20pipeline%20or%20not.%20In%20this%20example%20you%20can%20see%20that%20the%20idx%2C%20ip%20and%20type%20columns%20have%20been%20carried%20over%20from%20the%20source%20DataFrame%20and%20joined%20with%20the%20output.%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%20%3C%2FSPAN%3Eentities.IpAddress.util.whois(ip_df%2C%20column%3D%22ip%22%2C%20join%3D%22inner%22)%3C%2FPRE%3E%0A%3CTABLE%20width%3D%221132px%22%3E%0A%3CTHEAD%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2240px%22%3E%3CP%3E%3CSTRONG%3Eidx%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22121.905px%22%3E%3CP%3E%3CSTRONG%3Eip%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2253.3333px%22%3E%3CP%3E%3CSTRONG%3Etype%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2243.1746px%22%3E%3CP%3E%3CSTRONG%3Enir%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22100.952px%22%3E%3CP%3E%3CSTRONG%3Easn_registry%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2253.9683px%22%3E%3CP%3E%3CSTRONG%3Easn%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22122.54px%22%3E%3CP%3E%3CSTRONG%3Easn_cidr%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22144.127px%22%3E%3CP%3E%3CSTRONG%3Easn_country_code%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2276.1905px%22%3E%3CP%3E%3CSTRONG%3Easn_date%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22127.619px%22%3E%3CP%3E%3CSTRONG%3Easn_description%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22122.54px%22%3E%3CP%3E%3CSTRONG%3Equery%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22124.444px%22%3E%3CP%3E%3CSTRONG%3Enets%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTHEAD%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2240px%22%3E%3CP%3E0%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22121.905px%22%3E%3CP%3E172.217.15.99%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2253.3333px%22%3E%3CP%3EPublic%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2243.1746px%22%3E%3CP%3ENaN%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22100.952px%22%3E%3CP%3Earin%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2253.9683px%22%3E%3CP%3E15169%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22122.54px%22%3E%3CP%3E172.217.15.0%2F24%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22144.127px%22%3E%3CP%3EUS%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2276.1905px%22%3E%3CP%3E2012-04-16%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22127.619px%22%3E%3CP%3EGOOGLE%2C%20US%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22122.54px%22%3E%3CP%3E172.217.15.99%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22124.444px%22%3E%3CP%3E%5B%7B'cidr'%3A%20'172.217.0.0%2F16'%2C%20'name'%3A%20'GOOGLE'%2C%20'handle'%3A%20'NET-172-217-0-0-1'%2C%20'range'%3A%20'172.217.0...%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2240px%22%3E%3CP%3E1%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22121.905px%22%3E%3CP%3E40.85.232.64%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2253.3333px%22%3E%3CP%3EPublic%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2243.1746px%22%3E%3CP%3ENaN%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22100.952px%22%3E%3CP%3Earin%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2253.9683px%22%3E%3CP%3E8075%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22122.54px%22%3E%3CP%3E40.80.0.0%2F12%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22144.127px%22%3E%3CP%3EUS%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2276.1905px%22%3E%3CP%3E2015-02-23%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22127.619px%22%3E%3CP%3EMICROSOFT-CORP-MSN-AS-BLOCK%2C%20US%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22122.54px%22%3E%3CP%3E40.85.232.64%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22124.444px%22%3E%3CP%3E%5B%7B'cidr'%3A%20'40.80.0.0%2F12%2C%2040.124.0.0%2F16%2C%2040.125.0.0%2F17%2C%2040.74.0.0%2F15%2C%2040.120.0.0%2F14%2C%2040.76.0.0%2F14...%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2240px%22%3E%3CP%3E2%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22121.905px%22%3E%3CP%3E20.38.98.100%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2253.3333px%22%3E%3CP%3EPublic%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2243.1746px%22%3E%3CP%3ENaN%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22100.952px%22%3E%3CP%3Earin%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2253.9683px%22%3E%3CP%3E8075%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22122.54px%22%3E%3CP%3E20.36.0.0%2F14%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22144.127px%22%3E%3CP%3EUS%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2276.1905px%22%3E%3CP%3E2017-10-18%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22127.619px%22%3E%3CP%3EMICROSOFT-CORP-MSN-AS-BLOCK%2C%20US%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22122.54px%22%3E%3CP%3E20.38.98.100%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22124.444px%22%3E%3CP%3E%5B%7B'cidr'%3A%20'20.64.0.0%2F10%2C%2020.40.0.0%2F13%2C%2020.34.0.0%2F15%2C%2020.128.0.0%2F16%2C%2020.36.0.0%2F14%2C%2020.48.0.0%2F12%2C%20...%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--742639511%22%20id%3D%22toc-hId--743533394%22%3E%3CSTRONG%3EPipelines%3C%2FSTRONG%3E%3C%2FH3%3E%0A%3CP%3EPivot%20pipelines%20are%20implemented%20pandas%20customr%20accessors.%20Read%20more%20about%20%3CA%20href%3D%22https%3A%2F%2Fpandas.pydata.org%2Fpandas-docs%2Fstable%2Fdevelopment%2Fextending.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EExtending%20pandas%20here.%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhen%20you%20load%20%3CEM%3EPivot%3C%2FEM%3E%20it%20adds%20the%20%3CEM%3Emp_pivot%3C%2FEM%3E%26nbsp%3Bpandas%20DataFrame%20accessor.%20This%20appears%20as%20an%20attribute%20to%20DataFrames.%3C%2FP%3E%0A%3CPRE%3E%3CSTRONG%3E%26gt%3B%26gt%3B%26gt%3B%3C%2FSTRONG%3E%20ips_df%3CSTRONG%3E.%3C%2FSTRONG%3Emp_pivot%3CBR%20%2F%3E%3CSTRONG%3E%26lt%3B%3C%2FSTRONG%3Emsticpy%3CSTRONG%3E.%3C%2FSTRONG%3Edatamodel%3CSTRONG%3E.%3C%2FSTRONG%3Epivot_pd_accessor%3CSTRONG%3E.%3C%2FSTRONG%3EPivotAccessor%20at%200x275754e2208%3CSTRONG%3E%26gt%3B%3C%2FSTRONG%3E%3C%2FPRE%3E%0A%3CP%3EThe%20main%20pipelining%20function%20%3CEM%3Erun%3C%2FEM%3E%20is%20a%20method%20of%20%3CEM%3Emp_pivot%3C%2FEM%3E.%20%3CEM%3Erun%3C%2FEM%3E%20requires%20two%20parameters%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3Ethe%20pivot%20function%20to%20run%20and%3C%2FLI%3E%0A%3CLI%3Ethe%20column%20to%20use%20as%20input.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3ESee%20%3CA%20href%3D%22https%3A%2F%2Fmsticpy.readthedocs.io%2Fen%2Flatest%2Fdata_analysis%2FPivotFunctions.html%23mp-pivot-run%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Emp_pivot.run%20documentation%3C%2FA%3E%26nbsp%3Bfor%20more%20details.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHere%20is%20an%20example%20of%20using%20it%20to%20call%20four%20pivot%20functions%2C%20each%20using%20the%20output%20of%20the%20previous%20function%20as%20input%20and%20using%20the%20join%20parameter%20to%20accumulate%20the%20results%20from%20each%20stage.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E1.%20(%3CBR%20%2F%3E2.%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20ips_df%3CBR%20%2F%3E3.%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.mp_pivot.run(IpAddress.util.ip_type%2C%20column%3D%22IP%22%2C%20join%3D%22inner%22)%3CBR%20%2F%3E4.%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.query(%22result%20%3D%3D%20'Public'%22).head(10)%3CBR%20%2F%3E5.%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.mp_pivot.run(IpAddress.util.whois%2C%20column%3D%22ip%22%2C%20join%3D%22left%22)%3CBR%20%2F%3E6.%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.mp_pivot.run(IpAddress.util.geoloc_mm%2C%20column%3D%22ip%22%2C%20join%3D%22left%22)%3CBR%20%2F%3E7.%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.mp_pivot.run(IpAddress.AzureSentinel.SecurityAlert_list_alerts_for_ip%2C%20source_ip_list%3D%22ip%22%2C%20join%3D%22left%22)%3CBR%20%2F%3E8.%20).head(5)%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELet's%20step%20through%20it%20line%20by%20line.%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EThe%20whole%20thing%20is%20surrounded%20by%20a%20pair%20of%20parentheses%20-%20this%20is%20just%20to%20let%20us%20split%20the%20whole%20expression%20over%20multiple%20lines%20without%20Python%20complaining.%3C%2FLI%3E%0A%3CLI%3ENext%20we%20have%20%3CEM%3Eips_df%3C%2FEM%3E%20-%20this%20is%20just%20the%20starting%20DataFrame%2C%20our%20input%20data.%3C%2FLI%3E%0A%3CLI%3ENext%20we%20call%20the%20%3CEM%3Emp_pivot.run()%3C%2FEM%3E%20accessor%20method%20on%20this%20dataframe.%20We%20pass%20it%20the%20pivot%20function%20that%20we%20want%20to%20run%20(%3CEM%3EIpAddress.util.ip_type%3C%2FEM%3E)%20and%20the%20input%20column%20name%20(%3CEM%3EIP%3C%2FEM%3E).%20This%20column%20name%20is%20the%20column%20in%20%3CEM%3Eips_df%3C%2FEM%3E%20where%20our%20input%20IP%20addresses%20are.%20We've%20also%20specified%20an%20join%20type%20of%20%22inner%22.%20In%20this%20case%20the%20join%20type%20doesn't%20really%20matter%20since%20we%20know%20we%20get%20exactly%20one%20output%20row%20for%20every%20input%20row.%3C%2FLI%3E%0A%3CLI%3EWe're%20using%20the%20pandas%20%3CEM%3Equery%3C%2FEM%3E%20function%20to%20filter%20out%20unwanted%20entries%20from%20the%20previous%20stage.%20In%20this%20case%20we%20only%20want%20%22Public%22%20IP%20addresses.%20This%20illustrates%20that%20you%20can%20intersperse%20standard%20pandas%20functions%20in%20the%20same%20pipeline.%20We%20could%20have%20also%20added%20a%20column%20selector%20expression%20(%5B%5B%22col1%22%2C%20%22col2%22...%5D%5D)%2C%20for%20example%2C%20if%20we%20wanted%20to%20filter%20the%20columns%20passed%20to%20the%20next%20stage%3C%2FLI%3E%0A%3CLI%3EWe%20are%20calling%20a%20further%20pivot%20function%20-%20%3CEM%3Ewhois%3C%2FEM%3E.%20Remember%20the%20%22column%22%20parameter%20always%20refers%20to%20the%20input%20column%2C%20i.e.%20the%20column%20from%20previous%20stage%20that%20we%20want%20to%20use%20in%20this%20stage.%3C%2FLI%3E%0A%3CLI%3EWe%20are%20calling%20%3CEM%3Egeoloc_mm%3C%2FEM%3E%20to%20get%20geo%20location%20details%20joining%20with%20a%20%22left%22%20join%20-%20this%20preserves%20the%20input%20data%20rows%20and%20adds%20null%20columns%20in%20any%20cases%20where%20the%20pivot%20function%20returned%20no%20result.%3C%2FLI%3E%0A%3CLI%3EIs%20the%20same%20as%206%20except%20the%20called%20function%20is%20a%20data%20query%20to%20see%20if%20we%20have%20any%20alerts%20that%20contain%20these%20IP%20addresses.%20Remember%2C%20in%20the%20case%20of%20data%20queries%20we%20have%20to%20name%20the%20specific%20query%20parameter%20that%20we%20want%20the%20input%20to%20go%20to.%20In%20this%20case%2C%20each%20row%20value%20in%20the%20%3CEM%3Eip%3C%2FEM%3E%26nbsp%3Bcolumn%20from%20the%20previous%20stage%20will%20be%20sent%20to%20the%20query.%3C%2FLI%3E%0A%3CLI%3EFinally%20we%20close%20the%20parentheses%20to%20form%20a%20valid%20Python%20expression.%20The%20whole%20expression%20returns%20a%20DataFrame%20so%20we%20can%20add%20further%20pandas%20operations%20here%20(like%20%3CEM%3E.head(5)%3C%2FEM%3E%20shown%20here).%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%26gt%3B%26gt%3B%26gt%3B%20(%3CBR%20%2F%3E%20%20%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20ips_df%3CBR%20%2F%3E%20%20%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.mp_pivot.run(entities.IpAddress.util.ip_type%2C%20column%3D%22IP%22%2C%20join%3D%22inner%22)%3CBR%20%2F%3E%20%20%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.query(%22result%20%3D%3D%20'Public'%22).head(10)%3CBR%20%2F%3E%20%20%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%20.mp_pivot.run(entities.IpAddress.util.whois%2C%20column%3D%22ip%22%2C%20join%3D%22left%22)%3CBR%20%2F%3E%20%20%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%20.mp_pivot.run(entities.IpAddress.util.geoloc_mm%2C%20column%3D%22ip%22%2C%20join%3D%22left%22)%3CBR%20%2F%3E%20%20%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.mp_pivot.run(entities.IpAddress.AzureSentinel.SecurityAlert_list_alerts_for_ip%2C%20source_ip_list%3D%22ip%22%2C%20join%3D%22left%22)%3CBR%20%2F%3E%20%20%20).head(5)%3C%2FPRE%3E%0A%3CTABLE%20width%3D%221461px%22%3E%0A%3CTHEAD%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2240px%22%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%20width%3D%22111.746px%22%3E%3CP%3E%3CSTRONG%3ETenantId%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22126.349px%22%3E%3CP%3E%3CSTRONG%3ETimeGenerated%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22147.937px%22%3E%3CP%3E%3CSTRONG%3EAlertDisplayName%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2292.6984px%22%3E%3CP%3E%3CSTRONG%3EAlertName%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2271.746px%22%3E%3CP%3E%3CSTRONG%3ESeverity%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22120.635px%22%3E%3CP%3E%3CSTRONG%3EDescription%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22119.365px%22%3E%3CP%3E%3CSTRONG%3EProviderName%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22109.206px%22%3E%3CP%3E%3CSTRONG%3EVendorName%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22140.317px%22%3E%3CP%3E%3CSTRONG%3EVendorOriginalId%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22116.825px%22%3E%3CP%3E%3CSTRONG%3ESystemAlertId%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22137.143px%22%3E%3CP%3E%3CSTRONG%3EAlertType%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22133.968px%22%3E%3CP%3E%3CSTRONG%3EConfidenceLevel%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTHEAD%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2240px%22%3E%3CP%3E%3CSTRONG%3E0%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22111.746px%22%3E%3CP%3E8ecf8077-cf51-4820-aadd-14040956f35d%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22126.349px%22%3E%3CP%3E2020-12-23%2014%3A08%3A12%2B00%3A00%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22147.937px%22%3E%3CP%3EMicrosoft%20Threat%20Intelligence%20Analytics%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2292.6984px%22%3E%3CP%3EMicrosoft%20Threat%20Intelligence%20Analytics%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2271.746px%22%3E%3CP%3EMedium%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22120.635px%22%3E%3CP%3EMicrosoft%20threat%20intelligence%20analytic%20has%20detected%20Blocked%20communication%20to%20a%20known%20WatchList%20d...%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22119.365px%22%3E%3CP%3EThreat%20Intelligence%20Alerts%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22109.206px%22%3E%3CP%3EMicrosoft%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22140.317px%22%3E%3CP%3E91d806d3-6b6f-4e5c-a78f-e674d602be51%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22116.825px%22%3E%3CP%3E625ff9af-dddc-0cf8-9d4b-e79067fa2e71%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22137.143px%22%3E%3CP%3EThreatIntelligence%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22133.968px%22%3E%3CP%3E83%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2240px%22%3E%3CP%3E%3CSTRONG%3E1%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22111.746px%22%3E%3CP%3E8ecf8077-cf51-4820-aadd-14040956f35d%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22126.349px%22%3E%3CP%3E2020-12-23%2014%3A08%3A12%2B00%3A00%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22147.937px%22%3E%3CP%3EMicrosoft%20Threat%20Intelligence%20Analytics%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2292.6984px%22%3E%3CP%3EMicrosoft%20Threat%20Intelligence%20Analytics%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2271.746px%22%3E%3CP%3EMedium%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22120.635px%22%3E%3CP%3EMicrosoft%20threat%20intelligence%20analytic%20has%20detected%20Blocked%20communication%20to%20a%20known%20WatchList%20d...%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22119.365px%22%3E%3CP%3EThreat%20Intelligence%20Alerts%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22109.206px%22%3E%3CP%3EMicrosoft%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22140.317px%22%3E%3CP%3E173063c4-10dd-4dd2-9e4f-ec5ed596ec54%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22116.825px%22%3E%3CP%3Ec977f904-ab30-d57e-986f-9d6ebf72771b%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22137.143px%22%3E%3CP%3EThreatIntelligence%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22133.968px%22%3E%3CP%3E83%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2240px%22%3E%3CP%3E%3CSTRONG%3E2%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22111.746px%22%3E%3CP%3E8ecf8077-cf51-4820-aadd-14040956f35d%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22126.349px%22%3E%3CP%3E2020-12-23%2014%3A08%3A12%2B00%3A00%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22147.937px%22%3E%3CP%3EMicrosoft%20Threat%20Intelligence%20Analytics%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2292.6984px%22%3E%3CP%3EMicrosoft%20Threat%20Intelligence%20Analytics%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2271.746px%22%3E%3CP%3EMedium%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22120.635px%22%3E%3CP%3EMicrosoft%20threat%20intelligence%20analytic%20has%20detected%20Blocked%20communication%20to%20a%20known%20WatchList%20d...%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22119.365px%22%3E%3CP%3EThreat%20Intelligence%20Alerts%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22109.206px%22%3E%3CP%3EMicrosoft%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22140.317px%22%3E%3CP%3E58b2cda2-11c6-42b8-b6f1-72751cad8f38%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22116.825px%22%3E%3CP%3E9ee547e4-cba1-47d1-e1f9-87247b693a52%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22137.143px%22%3E%3CP%3EThreatIntelligence%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22133.968px%22%3E%3CP%3E83%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EOther%20pipeline%20functions%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EIn%20addition%20to%20%3CEM%3Erun%3C%2FEM%3E%2C%20the%20%3CEM%3Emp_pivot%3C%2FEM%3E%20accessor%20also%20has%20the%20following%20functions%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CEM%3Edisplay%3C%2FEM%3E%20-%20this%20simply%20displays%20the%20data%20at%20the%20point%20called%20in%20the%20pipeline.%20You%20can%20add%20an%20optional%20title%2C%20filtering%20and%20the%20number%20or%20rows%20to%20display%3C%2FLI%3E%0A%3CLI%3E%3CEM%3Etee%3C%2FEM%3E%20-%20this%20forks%20a%20copy%20of%20the%20DataFrame%20at%20the%20point%20it%20is%20called%20in%20the%20pipeline.%20It%20will%20assign%20the%20forked%20copy%20to%20the%20name%20given%20in%20the%20%3CEM%3Evar_name%3C%2FEM%3E%20parameter.%20If%20there%20is%20an%20existing%20variable%20of%20the%20same%20name%20it%20will%20not%20overwrite%20it%20unless%20you%20add%20the%20%3CEM%3Eclobber%3DTrue%3C%2FEM%3E%20parameter.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EIn%20both%20cases%20the%20pipelined%20data%20is%20passed%20through%20unchanged.%3C%2FP%3E%0A%3CP%3ESee%20%3CA%20href%3D%22https%3A%2F%2Fmsticpy.readthedocs.io%2Fen%2Flatest%2Fdata_analysis%2FPivotFunctions.html%23mp-pivot-display%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EPivot%20functions%20help%3C%2FA%3E%20for%20more%20details.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EUse%20of%20these%20is%20shown%20below%20in%20this%20partial%20pipeline.%3C%2FP%3E%0A%3CPRE%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20...%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.mp_pivot.run(IpAddress.util.geoloc_mm%2C%20column%3D%22ip%22%2C%20join%3D%22left%22)%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.mp_pivot.display(title%3D%22Geo%20Lookup%22%2C%20cols%3D%5B%22IP%22%2C%20%22City%22%5D)%26nbsp%3B%20%23%20%26lt%3B%26lt%3B%20display%20an%20intermediate%20result%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%26nbsp%3B.mp_pivot.tee(var_name%3D%22geoip_df%22%2C%20clobber%3DTrue)%26nbsp%3B%20%23%20%26lt%3B%26lt%3B%20save%20a%20copy%20called%20'geoip_df'%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.mp_pivot.run(IpAddress.AzureSentinel.SecurityAlert_list_alerts_for_ip%2C%20source_ip_list%3D%22ip%22%2C%20join%3D%22left%22)%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20the%20next%20release%20we've%20also%20implemented%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CEM%3Etee_exec%3C%2FEM%3E%20-%20this%20executes%20a%20function%20on%20a%20forked%20copy%20of%20the%20DataFrame%20The%20function%20must%20be%20a%20pandas%20function%20or%20custom%20accessor.%20A%20good%20example%20of%20the%20use%20of%20this%20might%20be%20creating%20a%20plot%20or%20summary%20table%20to%20display%20partway%20through%20the%20pipeline.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1615790603%22%20id%3D%22toc-hId-1614896720%22%3E%3CSTRONG%3EExtending%20Pivot%20-%20adding%20your%20own%20(or%20someone%20else's)%20functions%3C%2FSTRONG%3E%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20add%20pivot%20functions%20of%20your%20own.%20You%20need%20to%20supply%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3Ethe%20function%3C%2FLI%3E%0A%3CLI%3Esome%20metadata%20that%20describes%20where%20the%20function%20can%20be%20found%20and%20how%20the%20function%20works%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EFull%20details%20of%20this%20are%20%3CA%20href%3D%22https%3A%2F%2Fmsticpy.readthedocs.io%2Fen%2Flatest%2Fdata_analysis%2FPivotFunctions.html%23adding-custom-functions-to-the-pivot-interface%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Edescribed%20here%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20current%20version%20of%20Pivot%20doesn't%20let%20you%20add%20functions%20defined%20inline%20(i.e.%20written%20in%20the%20notebook%20itself)%20but%20this%20will%20be%20possible%20in%20the%20forthcoming%20release.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELet's%20create%20a%20function%20in%20a%20Python%20module%20%3CEM%3Emy_module.py%3C%2FEM%3E.%20We%20can%20do%20this%20using%20the%26nbsp%3B%3CEM%3E%25%25write_file%3C%2FEM%3E%20magic%20function%20and%20running%20the%20cell.%3C%2FP%3E%0A%3CPRE%3E%25%25writefile%20my_module.py%3CBR%20%2F%3E%22%22%22Upper-case%20and%20hash%22%22%22%3CBR%20%2F%3Efrom%20hashlib%20import%20md5%3CBR%20%2F%3E%3CBR%20%2F%3Edef%20my_func(input%3A%20str)%3A%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20md5_hash%20%3D%20%22-%22.join(hex(b)%5B2%3A%5D%20for%20b%20in%20md5(input.encode(%22utf-8%22)).digest())%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20return%20%7B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22Title%22%3A%20input.upper()%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22Hash%22%3A%20md5_hash%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FPRE%3E%0A%3CP%3EWe%20also%20need%20to%20create%20a%20YAML%20definition%20file%20for%20our%20pivot%20function.%20Again%20we%20can%20use%26nbsp%3B%3CEM%3E%25%25write_file%3C%2FEM%3E%20to%20create%20a%20local%20file%20in%20the%20current%20directory.%20We%20need%20to%20tell%20Pivot%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3Ethe%20name%20of%20the%20function%20and%20source%20module%2C%3C%2FLI%3E%0A%3CLI%3Ethe%20name%20of%20the%20container%20that%20the%20function%20will%20appear%20in%2C%3C%2FLI%3E%0A%3CLI%3Ethe%20input%20type%20expected%20by%20the%20function%20(%22value%22%2C%20%22list%22%20or%20%22dataframe%22)%3C%2FLI%3E%0A%3CLI%3Ewhich%20entities%20to%20add%20the%20pivot%20to%2C%20along%20with%20a%20corresponding%20attribute%20of%20the%20entity.%20(The%20attribute%20is%20used%20in%20cases%20where%20you%20are%20passing%20an%20instance%20of%20an%20entity%20itself%20as%20an%20input%20parameter%20-%20if%20in%20doubt%20just%20use%20any%20valid%20attribute%20of%20the%20entity).%3C%2FLI%3E%0A%3CLI%3EThe%20name%20of%20the%20input%20attribute%20of%20the%20underlying%20function.%3C%2FLI%3E%0A%3CLI%3EAn%20(optional)%20new%20name%20to%20give%20the%20function.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CPRE%3E%25%25writefile%20my_func.yml%3CBR%20%2F%3Epivot_providers%3A%3CBR%20%2F%3E%26nbsp%3B%20my_func_defn%3A%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20src_func_name%3A%20my_func%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20src_module%3A%20my_module%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20entity_container_name%3A%20cyber%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20input_type%3A%20value%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20entity_map%3A%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Host%3A%20HostName%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20func_input_value_arg%3A%20input%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20func_new_name%3A%20upper_hash_name%3C%2FPRE%3E%0A%3CP%3ENow%20we%20can%20register%20the%20function%20we%20created%20as%20a%20pivot%20function.%3C%2FP%3E%0A%3CPRE%3E%26gt%3B%26gt%3B%26gt%3B%20from%20msticpy.datamodel.pivot_register_reader%20import%20register_pivots%3CBR%20%2F%3E%26gt%3B%26gt%3B%26gt%3B%20register_pivots(%22my_func.yml%22)%3C%2FPRE%3E%0A%3CP%3EAn%20then%20run%20it.%3C%2FP%3E%0A%3CPRE%3E%26gt%3B%26gt%3B%26gt%3B%20Host.cyber.upper_hash_name(%22host_name%22)%3C%2FPRE%3E%0A%3CTABLE%3E%0A%3CTHEAD%3E%0A%3CTR%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3ETitle%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3EHash%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3Einput%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTHEAD%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3E0%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EHOST_NAME%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E5d-41-40-2a-bc-4b-2a-76-b9-71-9d-91-10-17-c5-92%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3Ehost_name%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20the%20next%20release%2C%20this%20will%20be%20available%20as%20a%20simple%20function%20that%20can%20be%20used%20to%20add%20a%20function%20defined%20in%20the%20notebook%20as%20shown%20here.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3Efrom%20hashlib%20import%20md5%3CBR%20%2F%3E%3CBR%20%2F%3Edef%20my_func2(input%3A%20str)%3A%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20md5_hash%20%3D%20%22-%22.join(hex(b)%5B2%3A%5D%20for%20b%20in%20md5(input.encode(%22utf-8%22)).digest())%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20return%20%7B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22Title%22%3A%20input.upper()%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22Hash%22%3A%20md5_hash%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3EPivot.add_pivot_function(%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20func%3Dmy_func2%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20container%3D%22cyber%22%2C%26nbsp%3B%20%23%20which%20container%20it%20will%20appear%20in%20on%20the%20entity%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20input_type%3D%22value%22%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20entity_map%3D%7B%22Host%22%3A%20%22HostName%22%7D%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20func_input_value_arg%3D%22input%22%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20func_new_name%3D%22il_upper_hash_name%22%2C%3CBR%20%2F%3E)%3CBR%20%2F%3E%3CBR%20%2F%3EHost.cyber.il_upper_hash_name(%22host_name%22)%3C%2FPRE%3E%0A%3CTABLE%3E%0A%3CTHEAD%3E%0A%3CTR%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3ETitle%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3EHash%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3Einput%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTHEAD%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%3E%3CP%3E%3CSTRONG%3E0%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3EHOST_NAME%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3E5d-41-40-2a-bc-4b-2a-76-b9-71-9d-91-10-17-c5-92%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%3E%3CP%3Ehost_name%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--191663860%22%20id%3D%22toc-hId--192557743%22%3E%3CSTRONG%3EConclusion%3C%2FSTRONG%3E%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe've%20taken%20a%20short%20tour%20through%20the%20%3CEM%3EMSTICPy%3C%2FEM%3E%26nbsp%3BPivot%20functions%2C%20looking%20at%20how%20they%20make%20the%20functionality%20in%20%3CEM%3EMSTICPy%3C%2FEM%3E%20easier%20to%20discover%20and%20use.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI'm%20particularly%20excited%20about%20the%20pipeline%20functionality.%20In%20the%20next%20release%20we're%20going%20to%20make%20it%20possible%20to%20define%20reusable%20pipelines%20in%20configuration%20files%20and%20execute%20them%20with%20a%20single%20function%20call.%20This%20should%20help%20streamline%20some%20common%20patterns%20in%20notebooks%20for%20Cyber%20hunting%20and%20investigation.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPlease%20send%20any%20feedback%20or%20suggestions%20for%20improvements%20to%20msticpy%40microsoft.com%20or%20create%20an%20issue%20on%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsticpy%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsticpy%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHappy%20hunting!%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1999118323%22%20id%3D%22toc-hId--2000012206%22%3EAppendix%20-%20how%20do%20pivot%20wrappers%20work%3F%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20Python%20you%20can%20create%20functions%20that%20return%20other%20functions.%20This%20is%20called%20wrapping%20the%20function.%3C%2FP%3E%0A%3CP%3EIt%20allows%20the%20outer%20function%20to%20do%20additional%20things%20to%20the%20input%20parameters%20and%20the%20return%20value%20of%20the%20inner%20function.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETake%20this%20simple%20function%20that%20just%20applies%20proper%20capitalization%20to%20an%20input%20string.%3C%2FP%3E%0A%3CPRE%3Edef%20print_me(arg)%3A%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20print(arg.capitalize())%3CBR%20%2F%3E%3CBR%20%2F%3Eprint_me(%22hello%22)%3C%2FPRE%3E%0A%3CP%3E%3CSTRONG%3EHello%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20we%20try%20to%20pass%20a%20list%20to%20this%20function%20we%20get%20an%20expected%20exception%20since%20the%20function%20only%20knows%20how%20to%20process%20a%20string%3C%2FP%3E%0A%3CPRE%3Eprint_me(%5B%22hello%22%2C%20%22world%22%5D)%3CBR%20%2F%3E%3CSTRONG%3E---------------------------------------------------------------------------%3CBR%20%2F%3E%3C%2FSTRONG%3E%3CSTRONG%3EAttributeError%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Traceback%20(most%20recent%20call%20last)%3CBR%20%2F%3E%3C%2FSTRONG%3E%3CSTRONG%3E%3CIPYTHON-INPUT-36-94B3E61EB86F%3E%20in%20%3CMODULE%3E%3CBR%20%2F%3E%3C%2FMODULE%3E%3C%2FIPYTHON-INPUT-36-94B3E61EB86F%3E%3C%2FSTRONG%3E%3CSTRONG%3E%E2%80%A6%3CBR%20%2F%3E%3C%2FSTRONG%3E%3CSTRONG%3EAttributeError%3A%20'list'%20object%20has%20no%20attribute%20'capitalize'%3C%2FSTRONG%3E%3C%2FPRE%3E%0A%3CP%3EWe%20could%20create%20a%20wrapper%20function%20that%20checked%20the%20input%20and%20iterated%20over%20the%20individual%20items%20if%20%3CEM%3Earg%3C%2FEM%3E%20is%20a%20list.%20The%20works%20but%20we%20don't%20want%20to%20have%20to%20do%20this%20for%20every%20function%20that%20we%20want%20to%20have%20flexible%20input!%3C%2FP%3E%0A%3CPRE%3Edef%20print_me_list(arg)%3A%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20if%20isinstance(arg%2C%20list)%3A%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20for%20item%20in%20arg%3A%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20print_me(item)%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20else%3A%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20print_me(arg)%3CBR%20%2F%3E%3CBR%20%2F%3Eprint_me_list(%22hello%22)%3CBR%20%2F%3Eprint_me_list(%5B%22how%22%2C%20%22are%22%2C%20%22you%22%2C%20%22%3F%22%5D)%3C%2FPRE%3E%0A%3CP%3E%3CSTRONG%3EHello%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EHow%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EAre%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EYou%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3F%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EInstead%2C%20we%20can%20create%20a%20function%20%3CEM%3Ewrapper%3C%2FEM%3E.%3C%2FP%3E%0A%3CP%3EIn%20the%20example%20below%2C%20the%20outer%20function%20%3CEM%3Edont_care_func%3C%2FEM%3E%20defines%20an%20inner%20function%20-%26nbsp%3B%3CEM%3Elist_or_str%3C%2FEM%3E%26nbsp%3B-%20and%20then%20returns%20this%20function.%20The%20inner%20function%20%3CEM%3Elist_or_str%3C%2FEM%3E%20is%20what%20implements%20the%20same%20%22is-this-a-string-or-list%22%20logic%20that%20we%20saw%20in%20the%20previous%20example.%20Crucially%20though%2C%20it%20isn't%20hard-coded%20to%20call%20%3CEM%3Eprint_me%3C%2FEM%3E%20but%20calls%20whatever%20function%20is%20passed%20(the%20%3CEM%3Efunc%3C%2FEM%3E%20parameter)%20to%20it%20from%20the%20outer%20function%20%3CEM%3Edont_care_func%3C%2FEM%3E.%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CPRE%3E%23%20Our%20magic%20wrapper%3CBR%20%2F%3Edef%20dont_care_func(func)%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20def%20list_or_str(arg)%3A%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20if%20isinstance(arg%2C%20list)%3A%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20for%20item%20in%20arg%3A%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20func(item)%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20else%3A%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20func(arg)%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20return%20list_or_str%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHow%20do%20we%20use%20this%3F%3C%2FP%3E%0A%3CP%3EWe%20simply%20pass%20the%20function%20that%20we%20want%20to%20wrap%20to%20%3CEM%3Edont_care_func%3C%2FEM%3E.%20Recall%2C%20that%20this%20function%20just%20returns%20an%20instance%20of%20the%20inner%20function.%20In%20this%20case%20the%20value%20%3CEM%3Efunc%3C%2FEM%3E%20will%20have%20been%20replaced%20by%20the%20actual%20function%20%3CEM%3Eprint_me%3C%2FEM%3E.%3C%2FP%3E%0A%3CPRE%3E%3CSTRONG%3E%26nbsp%3B%3C%2FSTRONG%3Eprint_stuff%20%3D%20dont_care_func(print_me)%3C%2FPRE%3E%0A%3CP%3ENow%20we%20have%20a%20wrapped%20version%20of%20%3CEM%3Eprint_me%3C%2FEM%3E%20that%20can%20handle%20different%20types%20of%20input.%20Magic!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3Eprint_stuff(%22hello%22)%3CBR%20%2F%3Eprint_stuff(%5B%22how%22%2C%20%22are%22%2C%20%22you%22%2C%20%22%3F%22%5D)%3C%2FPRE%3E%0A%3CP%3E%3CSTRONG%3EHello%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EHow%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EAre%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EYou%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3F%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EWe%20can%20also%20define%20further%20functions%20and%20create%20wrapped%20versions%20of%20those%20by%20passing%20them%20to%20%3CEM%3E%3CU%3Edont_care_func%3C%2FU%3E%3C%2FEM%3E%3CSTRONG%3E.%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CPRE%3Edef%20shout_me(arg)%3A%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20print(arg.upper()%2C%20%22%5CU0001F92C!%22%2C%20end%3D%22%20%22)%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3Eshout_stuff%20%3D%20dont_care_func(shout_me)%3CBR%20%2F%3E%3CBR%20%2F%3Eshout_stuff(%22hello%22)%3CBR%20%2F%3Eshout_stuff(%5B%22how%22%2C%20%22are%22%2C%20%22you%22%2C%20%22%3F%22%5D)%3C%2FPRE%3E%0A%3CP%3E%3CSTRONG%3EHELLO%20%3C%2FSTRONG%3E%3CSTRONG%3E%F0%9F%A4%AC%3C%2FSTRONG%3E%3CSTRONG%3E!%20HOW%20%3C%2FSTRONG%3E%3CSTRONG%3E%F0%9F%A4%AC%3C%2FSTRONG%3E%3CSTRONG%3E!%20ARE%20%3C%2FSTRONG%3E%3CSTRONG%3E%F0%9F%A4%AC%3C%2FSTRONG%3E%3CSTRONG%3E!%20YOU%20%3C%2FSTRONG%3E%3CSTRONG%3E%F0%9F%A4%AC%3C%2FSTRONG%3E%3CSTRONG%3E!%20%3F%20%3C%2FSTRONG%3E%3CSTRONG%3E%F0%9F%A4%AC%3C%2FSTRONG%3E%3CSTRONG%3E!%20%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20wrapper%20functionality%20in%20Pivot%20is%20a%20bit%20more%20complex%20than%20this%20but%20essentially%20operates%20this%20way.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2151112%22%20slang%3D%22en-US%22%3E%3CP%3EPivot%20functions%20in%20MSTICPy%20and%20Azure%20Sentinel%20Notebooks%3C%2FP%3E%0A%3CP%3EPivot%20functions%20attached%20to%20entities%20allow%20you%20to%20quickly%20find%20the%20query%2C%20threat%20intel%20or%20enrichment%20function%20you%20need.%20They%20support%20multiple%20input%20types%20and%20can%20be%20chained%20together%20to%20produce%20powerful%20pipelines.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22PivotBrowser.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F256265i4FD6C824A11D3F5F%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22PivotBrowser.png%22%20alt%3D%22PivotBrowser.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2151112%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EJupyter%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ENotebooks%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESecurity%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Co-Authors
Version history
Last update:
‎Mar 23 2021 04:46 PM
Updated by: