Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

dummy-data

Create dummies from column with multiple values in pandas

August 20, 2023 by Tarik

I know it’s been a while since this question was asked, but there is (at least now there is) a one-liner that is supported by the documentation: In [4]: df Out[4]: label 0 (a, c, e) 1 (a, d) 2 (b,) 3 (d, e) In [5]: df[‘label’].str.join(sep=’*’).str.get_dummies(sep=’*’) Out[5]: a b c d e 0 1 … Read more

Categories python Tags categorical-data, dummy-data, pandas, python Leave a comment

Quickest way to fill SQL Table with Dummy Data [closed]

May 13, 2023 by Tarik

You Only need Go 1000 after your INSERT, to fill it 1000 times, just like this: INSERT INTO dbo.Cusomers(Id, FirstName, LastName) VALUES(1, ‘Mohamed’, ‘Mousavi’) GO 1000 It will make a table with 1000 same rows in it. Another solution is that you can populate the beginning rows of your table with some data, then you … Read more

Categories sql Tags dummy-data, sql, sql-server Leave a comment

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa